Cheking Bad Actions
#1

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.
Reply
#2

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;
Reply
#3

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.
Reply
#4

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

Isn't my script working perfect?
Reply
#6

only i change giveplayerid to playerid as said Zonoya
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)