SA-MP Forums Archive
OnPlayerStateChange - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerStateChange (/showthread.php?tid=119473)



OnPlayerStateChange - Jakku - 08.01.2010

Delete


Re: OnPlayerStateChange - SiJ - 08.01.2010

Quote:
Originally Posted by Jakku
pawn Код:
new SAPDCar[7];

    SAPDCar[0] = CreateVehicle(598,2277.6846,2477.1096,10.5652,180.1090,0,1,900);
    SAPDCar[1] = CreateVehicle(598,2268.9888,2443.1697,10.5662,181.8062,0,1,900);
    SAPDCar[2] = CreateVehicle(598,2256.2891,2458.5110,10.5680,358.7335,0,1,900);
    SAPDCar[3] = CreateVehicle(598,2251.6921,2477.0205,10.5671,179.5244,0,1,900);
    SAPDCar[4] = CreateVehicle(523,2294.7305,2441.2651,10.3860,9.3764,0,0,900);
    SAPDCar[5] = CreateVehicle(523,2290.7268,2441.3323,10.3944,16.4594,0,0,900);
    SAPDCar[6] = CreateVehicle(523,2295.5503,2455.9656,2.8444,272.6913,0,0,900);

pawn Код:
new getthecar = GetPlayerVehicleID(playerid);
 
for(new i=0; i<sizeof(SAPDCar); i++)
{      
 if(getthecar == SAPDCar[i])
    {
        if(job[playerid] == 1){
      }
      else
      {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, COLOR_WHITE, "Error: This vehicle belongs to San Andreas Police Department");
      }
    }
}



Re: OnPlayerStateChange - Jakku - 08.01.2010

Quote:
Originally Posted by SiJ
Quote:
Originally Posted by Jakku
pawn Код:
new SAPDCar[7];

    SAPDCar[0] = CreateVehicle(598,2277.6846,2477.1096,10.5652,180.1090,0,1,900);
    SAPDCar[1] = CreateVehicle(598,2268.9888,2443.1697,10.5662,181.8062,0,1,900);
    SAPDCar[2] = CreateVehicle(598,2256.2891,2458.5110,10.5680,358.7335,0,1,900);
    SAPDCar[3] = CreateVehicle(598,2251.6921,2477.0205,10.5671,179.5244,0,1,900);
    SAPDCar[4] = CreateVehicle(523,2294.7305,2441.2651,10.3860,9.3764,0,0,900);
    SAPDCar[5] = CreateVehicle(523,2290.7268,2441.3323,10.3944,16.4594,0,0,900);
    SAPDCar[6] = CreateVehicle(523,2295.5503,2455.9656,2.8444,272.6913,0,0,900);

pawn Код:
new getthecar = GetPlayerVehicleID(playerid);
 
for(new i=0; i<sizeof(SAPDCar); i++)
{      
 if(getthecar == SAPDCar[i])
    {
        if(job[playerid] == 1){
      }
      else
      {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, COLOR_WHITE, "Error: This vehicle belongs to San Andreas Police Department");
      }
    }
}
Oh damn, I'm really stupid xD. Thanks anyway

EDIT: It works perfect