HELP TO DISABLE COMMANDS IN DIFFERENT WAYS. - 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: HELP TO DISABLE COMMANDS IN DIFFERENT WAYS. (
/showthread.php?tid=663863)
HELP TO DISABLE COMMANDS IN DIFFERENT WAYS. -
Salvador75 - 13.02.2019
So anyonce can help me to how to disable the commands if
got
Wanted Level Stars
and
If Player is on interior and world.
Example
Player got wanted level 1
he type command like this
/gotomycar then “You cannot use command while you have wanted level”
Example 2 Player is in Interior Or another world
/sf - you cannot use this command on this place
can anyone give me some pawn.
Re: HELP TO DISABLE COMMANDS IN DIFFERENT WAYS. -
Kaliber - 13.02.2019
If you use a CMD-Processor pack it in the Callback "OnPlayerCommandReceived" otherwise OnPlayerCommandText:
PHP код:
if(GetPlayerWantedLevel(playerid) > 0 && !GetPlayerInterior(playerid) && !GetPlayerVirtualWorld(playerid)) return SendClientMessage(playerid,-1,"You cannot use command while you have wanted level"),0;
if(GetPlayerWantedLevel(playerid) > 0 && GetPlayerInterior(playerid) > 0 && GetPlayerVirtualWorld(playerid) > 0) return SendClientMessage(playerid,-1,"you cannot use this command on this place"),0;
Re: HELP TO DISABLE COMMANDS IN DIFFERENT WAYS. -
Salvador75 - 14.02.2019
I am using zcmd can you please give a full tutorial.
Re: HELP TO DISABLE COMMANDS IN DIFFERENT WAYS. -
Kaliber - 14.02.2019
Read the zcmd post, there is explained what OnPlayerCommandReceived is for.
Actually the name says it already.
And the 3 functions you can look up on the
https://sampwiki.blast.hk/
And then you should learn the basic logic in Pawn.
Read some tutorials, that are 2 lines of code...i am pretty sure, you can get this