SA-MP Forums Archive
[HELP] Help with stopping cmds! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Help with stopping cmds! (/showthread.php?tid=98951)



[HELP] Help with stopping cmds! - Tigerbeast11 - 24.09.2009

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!


Re: [HELP] Help with stopping cmds! - ded - 24.09.2009

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


Re: [HELP] Help with stopping cmds! - Tigerbeast11 - 25.09.2009

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!


Re: [HELP] Help with stopping cmds! - ded - 25.09.2009

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!");



Re: [HELP] Help with stopping cmds! - Tigerbeast11 - 26.09.2009

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

it works


Re: [HELP] Help with stopping cmds! - ded - 26.09.2009

Heh, no problem man.