SA-MP Forums Archive
TRAILER - 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: TRAILER (/showthread.php?tid=584457)



TRAILER - sscarface - 04.08.2015

Guyz what's wrong here?
I m trying to add if player is in mission and his truck trailer get away so it player get this message but its not working

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
if(
newstate == PLAYER_STATE_DRIVER)
        {
           if(
pData[playerid][pMission] == MISSION_TYPE_TRUCK_2)
           {
               new 
vehicleid;
               
vehicleid GetPlayerVehicleID(playerid);
               if(!
IsTrailerAttachedToVehicle(vehicleid))
               {
                 return 
SendClientMessage(playeridRED"ATTACT TRAILR");
               }
           }
        }