HELP TO DISABLE COMMANDS IN DIFFERENT WAYS.
#1

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

If you use a CMD-Processor pack it in the Callback "OnPlayerCommandReceived" otherwise OnPlayerCommandText:

PHP код:
if(GetPlayerWantedLevel(playerid) > && !GetPlayerInterior(playerid) && !GetPlayerVirtualWorld(playerid)) return SendClientMessage(playerid,-1,"You cannot use command while you have wanted level"),0;
if(
GetPlayerWantedLevel(playerid) > && GetPlayerInterior(playerid) > && GetPlayerVirtualWorld(playerid) > 0) return SendClientMessage(playerid,-1,"you cannot use this command on this place"),0
Reply
#3

I am using zcmd can you please give a full tutorial.
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)