[HELP] Help with stopping cmds!
#1

Hey guys!!! IM really depressed right now, cuz i cant find the solution to this answer anywhere (well i have found it but i cant understand it) anyway! I have created a heal cmd which sets player health to 100. but i want to stop players from using /heal at a dm zone, or else it just spoils the whole fun of it being a dm zone!


Plz can someone show me what i have to do! for example, maybe write out the script for that cmd plz guys!
Reply
#2

What does the code to your "dm zone" look like, show us.
Reply
#3

To be honest, it doesnt really have much of a code. but ill give u it anyway

here it is!

[Pawn Code]public miniwar(playerid)
{
printf("ID %d has successfully entered war DM",playerid);
GivePlayerWeapon(playerid, 31, 99999);
GivePlayerWeapon(playerid, 24, 99999);
GivePlayerWeapon(playerid, 16, 99999);
SetPlayerWorldBounds(playerid, 560.538, -210.2018, 2207.118, 1599.869);
}[/Pawn Code]

It works fine, just i dont wannt ppl to use /heal in it!
Reply
#4

If you have a variable that tells the script the player is in the DM zone .. for example something like PlayerIsInDM[playerid] you could do it on OnPlayerCommandText something like:

pawn Код:
if(PlayerIsInDM[playerid] == 1) return SendClientMessage(playerid, red, "You cannot heal in DM!");
Reply
#5

hey thnx dude, it gave me a few errors, but i cured them :P

it works
Reply
#6

Heh, no problem man.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)