hey guys i am making a cmd !stopcar and !startcar see this what i did wrong in it
else if ( strcmp( cmd, "!stopcar", true ) == 0 )
{
tmp = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
else if(!strlen(tmp)) SendClientMessage(playerid,COLOR_GREEN, "USAGE: !stopcar [VehicleID]");
else if(IsVehicleOwnedShared(strval(tmp),gPlayers[playerid]) == -1) SendClientMessage(playerid,COLOR_GREEN, "You do not have the keys for Stop that vehicle.");
else {
new vehicle = strval( tmp )
SendClientMessage( playerid, RED, "You stopped Car" );
GetVehicleStop( vehicleid );
}
return 1;
}
else if ( strcmp( cmd, "!startcar", true ) == 0 )
{
tmp = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
else if(!strlen(tmp)) SendClientMessage(playerid,COLOR_GREEN, "USAGE: !startcar [VehicleID]");
else if(IsVehicleOwnedShared(strval(tmp),gPlayers[playerid]) == -1) SendClientMessage(playerid,COLOR_GREEN, "You do not have the keys for start that vehicle.");
else {
new vehicle = strval( tmp )
SendClientMessage( playerid, RED, "You started Car" );
SetVehicleStart( vehicleid );
}
return 1;
}