hello, need help with a command!
#2

pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
new modelid = GetVehicleModel(vehicleid);
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_ERROR, "USAGE: /info [Playerid]");
...
if(IsPlayerInVehicle(giveplayerid,vehicleid))
{
    format(vstr, sizeof(vstr), "~p~In %s",aVehicleNames[modelid - 400]);
}
else
{
    vstr = "~p~On Foot";
}
It gets the vehicleid and modelid of the player who typed the command and then it checks if the given player is in the vehicle of the player who typed the command and if not, it says on foot. So remove the 2 lines above sscanf and change to:
pawn Код:
new modelid = GetVehicleModel(GetPlayerVehicleID(giveplayerid));
if(modelid) format(vstr, sizeof(vstr), "~p~In %s",aVehicleNames[modelid - 400]);
else vstr = "~p~On Foot";
Reply


Messages In This Thread
hello, need help with a command! - by danish007 - 20.06.2014, 21:06
Re: hello, need help with a command! - by Konstantinos - 20.06.2014, 21:13

Forum Jump:


Users browsing this thread: 1 Guest(s)