How can i make player not use commands while jailed ? - 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: How can i make player not use commands while jailed ? (
/showthread.php?tid=562518)
How can i make player not use commands while jailed ? -
Glossy42O - 09.02.2015
Like the title says - that didn't work
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(Mute[playerid] == 1)
{
SendClientMessage(playerid, -1, "{FF0000}You're jailed, you're muted and you are not allowed to use commands.");
return 0;
}
else
{
if(Mute[playerid] == 0) return 1;
}
return 1;
}
Re: How can i make player not use commands while jailed ? -
HazardouS - 09.02.2015
Remove the "else" part, you don't need it.
Re: How can i make player not use commands while jailed ? -
M4D - 09.02.2015
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Your Command", cmdtext, true, 10) == 0)
{
if(Mute[playerid] == 1)
{
return SendClientMessage(playerid, -1, "{FF0000}You're jailed, you're muted and you are not allowed to use commands.");
}
else if(Mute[playerid] == 0) return 1;
}
return 0;
}
Re: How can i make player not use commands while jailed ? -
Glossy42O - 09.02.2015
same
Re: How can i make player not use commands while jailed ? -
Sascha - 09.02.2015
are you maybe using zcmd?
in this case use
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[]);
instead of OnPlayerCommandText