GetVehicleModel
#1

Hello i have made this command to strat the job only if player in vehicle id 414 else it wont but even if i get in vehicle id 414 the job wont work and i get the "You need mule van to start this job" message whats wrong

PHP код:
CMD:clothes(playerid,params[])
{
  if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,Red,"You need Mule van to start this job");
  if(
GetVehicleModel(GetPlayerVehicleID(playerid) == 414))
  {
    
IsJob[playerid] = true;
    
BincoC CreateDynamicCP(2245.5964,-1660.4717,15.2866,3.0,-1,0,playerid,100.0,-1,0);
    
SendClientMessage(playerid,Roz,"{FFFFFF}Deliver the clothes to {FF0000}Binco {FFFFFF}store");
  }
  else
  {
    
SendClientMessage(playerid,Red,"You need Mule van to start this job");
  }
  return 
1;

Reply
#2

You placed the brackets wrong.

if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 414)
Reply
#3

Quote:
Originally Posted by iSpark
Посмотреть сообщение
You placed the brackets wrong.

if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 414)
Thank you man
Reply
#4

Код:
CMD:clothes(playerid,params[]) 
{ 
  if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,Red,"You need Mule van to start this job"); 
  if(GetVehicleModel(GetPlayerVehicleID(playerid) != 414)return   SendClientMessage(playerid,Red,"You need Mule van to start this job"); 
    IsJob[playerid] = true; 
    BincoC = CreateDynamicCP(2245.5964,-1660.4717,15.2866,3.0,-1,0,playerid,100.0,-1,0); 
    SendClientMessage(playerid,Roz,"{FFFFFF}Deliver the clothes to {FF0000}Binco {FFFFFF}store");  
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)