SA-MP Forums Archive
Cheking Bad Actions - 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: Cheking Bad Actions (/showthread.php?tid=287965)



Cheking Bad Actions - ServerScripter - 05.10.2011

Is there anyway to check if the player is Cuffed, and he Left the Server?
Cause i want to Punish the Handcuffed players who want logoff to avoid RP Scenes.


Re: Cheking Bad Actions - Kingunit - 05.10.2011

You need to create something like:
pawn Код:
// Ontop
new Cuffed[ MAX_PLAYERS ],

public OnPlayerDisconnect(playerid, reason)
{
    if( Cuffed[ playerid ] == 1 )
    {
        // Quitjail function.
    }
    else
    {
        // Leave messages.
    }
   
    return 1;
}

// At your cuff command:
Cuffed[ playerid ] = 1;

// At your uncuff command:
Cuffed[ playerid ] = 0;



Re: Cheking Bad Actions - ServerScripter - 05.10.2011

I put this Under onplayerdisconnect
PHP код:
if(PlayerCuffed[giveplayerid] == 2)
{
SafeGivePlayerMoney(playerid4500);
 

But i get Error:
Код:
C:\DOCUME~1\PC\Bureau\CMVA\GAMEMO~1\CMVA.pwn(5852) : error 017: undefined symbol "giveplayerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Cheking Bad Actions - Zonoya - 05.10.2011

its if(PlayerCuffed[playerid] == 2) not urs


Re: Cheking Bad Actions - Kingunit - 05.10.2011

Isn't my script working perfect?


Re: Cheking Bad Actions - ServerScripter - 05.10.2011

only i change giveplayerid to playerid as said Zonoya