undefined symbol "vehicleid" HELP!
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Your car has not been tuned as you're not in one.");
        TuneVehicleRandomly(GetPlayerVehicleID(playerid));
        return SendClientMessage(playerid,-1,"Your car has been tuned.");
    }
    return 0;
}
Using GetPlayerVehicleID() informs the script of the vehicle ID you want. It selects the vehicle ID the player is currently in who executes the command.

I've added a check to ensure the player is even in a vehicle too, and removed the pointless return.
Reply


Messages In This Thread
undefined symbol "vehicleid" HELP! - by VanillaRain - 23.04.2012, 18:04
Re: undefined symbol "vehicleid" HELP! - by Scripter12345 - 23.04.2012, 18:08
AW: undefined symbol "vehicleid" HELP! - by BigETI - 23.04.2012, 18:08
Respuesta: undefined symbol "vehicleid" HELP! - by Francis. - 23.04.2012, 18:09
Re: undefined symbol "vehicleid" HELP! - by Calgon - 23.04.2012, 18:11
Re: undefined symbol "vehicleid" HELP! - by VanillaRain - 23.04.2012, 18:27
Re: Respuesta: undefined symbol "vehicleid" HELP! - by VanillaRain - 23.04.2012, 18:29
Re: undefined symbol "vehicleid" HELP! - by Calgon - 23.04.2012, 18:29
Re: undefined symbol "vehicleid" HELP! - by VanillaRain - 23.04.2012, 18:31

Forum Jump:


Users browsing this thread: 1 Guest(s)