SA-MP Forums Archive
[HELP]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)
+--- Thread: [HELP]OnPlayerStateChange (/showthread.php?tid=488806)



[HELP]OnPlayerStateChange - Orhun_Kaya - 19.01.2014

hello guys I created dynamic faction cars and everything is okey but this code doesn't work help me please

PHP код:
    if(newstate == 2)
    {
    for(new 
0sizeof(FactionAracBilgi); s++)
    {
     new 
Ara GetPlayerVehicleID(playerid);
    if(
Ara != DFAracSpawn[s])
    {
    if(
PlayerInfo[playerid][pFaction] == FactionAracBilgi[s][dFAracFaction]) return SendClientMessage(playerid,0xFFFFFF,"Bu aracın anahtarları sende yok."),RemovePlayerFromVehicle(playerid);
    }}} 



Re: [HELP]OnPlayerStateChange - gtascripterultimate - 19.01.2014

Quote:
Originally Posted by Orhun_Kaya
Посмотреть сообщение
hello guys I created dynamic faction cars and everything is okey but this code doesn't work help me please

PHP код:
    if(newstate == 2)
    {
    for(new 
0sizeof(FactionAracBilgi); s++)
    {
     new 
Ara GetPlayerVehicleID(playerid);
    if(
Ara != DFAracSpawn[s])
    {
    if(
PlayerInfo[playerid][pFaction] == FactionAracBilgi[s][dFAracFaction]) return SendClientMessage(playerid,0xFFFFFF,"Bu aracın anahtarları sende yok."),RemovePlayerFromVehicle(playerid);
    }}} 
Test this:

Код:
 
if(newstate == 2) { for(new s = 0; s < sizeof(FactionAracBilgi); s++) { new Ara = GetPlayerVehicleID(playerid); if(Ara != DFAracSpawn[s]) { if(PlayerInfo[playerid][pFaction] == FactionAracBilgi[s][dFAracFaction]) return SendClientMessage(playerid,0xFFFFFF,"Bu aracın anahtarları sende yok.") && RemovePlayerFromVehicle(playerid); }}}



Re: [HELP]OnPlayerStateChange - gahal156 - 19.01.2014

What's the error?


Re: [HELP]OnPlayerStateChange - Orhun_Kaya - 19.01.2014

Quote:
Originally Posted by gtascripterultimate
Посмотреть сообщение
Test this:

Код:
 
if(newstate == 2) { for(new s = 0; s < sizeof(FactionAracBilgi); s++) { new Ara = GetPlayerVehicleID(playerid); if(Ara != DFAracSpawn[s]) { if(PlayerInfo[playerid][pFaction] == FactionAracBilgi[s][dFAracFaction]) return SendClientMessage(playerid,0xFFFFFF,"Bu aracın anahtarları sende yok.") && RemovePlayerFromVehicle(playerid); }}}
I trying

EDIT: Doesn't work