28.07.2013, 23:37
Quote:
Hello, I am working on a role-play script, and I am wondering if it is possible if I can make it so that '/q' (exits client) to check if they are in a police car, or tied, or being dragged, something like that, and for it to not exit the client if it does that.
|
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
if(/* is player tied var*/)
{
Kick(playerid);
}
return 1;
}
Quote:
You can not prevent players from using /q, but if they are doing something such as their vehicle is on fire, or they are falling, or are about to be arrested etc. when they /q, you could punish them when they return.
|
pawn Код:
CMD:q(playerid, params[])
{
if(/* is player tied */) return SendClientMessage(playerid, 0xAFAFAFAA, "Error: You cannot quit during being tied!");
return 1;
}