SA-MP Forums Archive
You are in no train - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: You are in no train (/showthread.php?tid=662344)



You are in no train - playstores - 29.12.2018

Quote:

ocmd:trainduty(playerid,params[])
{
new hurensohn = GetVehicleModel(playerid);
if(PlayerInfo[playerid][pJob]!= return SCM(playerid,COOLRED,"You are no Train Driver!");
if(TrainDuty[playerid]==1) return SCM(playerid,COOLRED,"You're already On Duty !");
if(hurensohn== 537 || hurensohn== 53
{
TrainDuty[playerid]= 1;
TrainCP[playerid]= 1;
SetPlayerCheckpoint(playerid,1446.8014,2632.0544,1 0.8203,8.0);
NearMessage(playerid,"Next Station: San Fierro");
TrainCPTime[playerid] = GetTickCount() + 60000;
return 1;
}
else return SCM(playerid,COOLRED,"You are not in any Train");
}

I don't get it, why I always get that message even if I am in a Train?
You are in no train


Re: You are in no train - RoboN1X - 29.12.2018

You forgot to get the vehicle id
Код:
new hurensohn = GetVehicleModel(GetPlayerVehicleID(playerid));



Re: You are in no train - playstores - 29.12.2018

Quote:
Originally Posted by RoboN1X
Посмотреть сообщение
You forgot to get the vehicle id
Код:
new hurensohn = GetVehicleModel(GetPlayerVehicleID(playerid));
thx mate