maybe bug ?
#1

When i compile i got no error but ingame when im in car id 440 it shows me you are not in truck .. here are the code:

if(strcmp(cmdtext,"/loadtruck",true)==0)
{
if(GetPlayerTeam(playerid) != TEAM_CIVILIAN) return SendClientMessage(playerid, COLOR_RED, "You need to be civilian to work!");
if(GetPlayerVehicleID(playerid) != 440) return SendClientMessage(playerid, COLOR_RED, "You need to be in truck!");
if(IsPlayerInRangeOfPoint(playerid,5, 2429.1511, -2103.7902, 13.546)
{
ShowPlayerDialog(playerid, DIALOG_TRUCK, DIALOG_STYLE_LIST, "Products for load", "Clothes\n Pizza\n Weapons\n Equipment\n Fuel/Gas\n Drugs", "Load", "Cancel");
}
else
{
SendClientMessage(playerid,0x0000BBAA,"You are not at the loadplace!");
}
return 1;
}
Reply
#2

Change the second line to:
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 440) return SendClientMessage(playerid, COLOR_RED, "You need to be in truck!");
Vehicle ID != Model ID.
Reply
#3

thanks alot man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)