30.05.2010, 14:37
I want to disable commands and teleports if someone is ajailed. How to do that?
//on top
new pJailed[MAX_PLAYERS] = 0;
//at the commands:
if(pJailed[playerid] == 1) return SendClientMessage(playerid, Color,"Hi there, you can't use commands because you are jailed!");
Originally Posted by FuTuRe`
Not sure but i'll make a example:
pawn Код:
|
if(pJailed[playerid] == 1) return SendClientMessage(playerid, Color,"Hi there, you can't use commands because you are jailed!");
Originally Posted by FuTuRe`
just at the lines you don't want them to teleport or do something put that
Код:
if(pJailed[playerid] == 1) return SendClientMessage(playerid, Color,"Hi there, you can't use commands because you are jailed!"); |
CallRemoteFunction
Originally Posted by FuTuRe`
use
Код:
CallRemoteFunction |
forward namez(playerid);
public namez(playerid)
{
pJailed[playerid] = 1;
return 1;
}
CallRemoteFunction("namez", "d", playerid);
Originally Posted by MrDeGekkerd
Quote:
I am a beginner, and don't understand such things |