Help needed. - 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 needed. (
/showthread.php?tid=148683)
Help needed. -
MastahServers - 18.05.2010
Like, if someone enters for example /minigun, it says a message: 'You need to type /dmq if youw ant to leave the dm area'
How to make that?
Re: Help needed. -
ViruZZzZ_ChiLLL - 18.05.2010
On top of script :
Under OnPlayerDeath :
pawn Код:
if(DM[playerid]==1)
{
DM[playerid]=0;
}
Under OnPlayerCommand :
pawn Код:
if(DM[playerid]&& strcmp(cmdtext, "/dmq", true)!=0)return SendClientMessage(playerid,COLOR_RED,"ERROR : You cannot use that command while your in the DM area! /dmq to exit the DM area.");
Then put this under the command of the teleport to the DM :
Re: Help needed. -
jamesbond007 - 18.05.2010
Код:
//top
new bool:InDmZone[MAX_PLAYERS];
if(!strcmp(cmdtext, "/dmz", true))
{
InDmZone[playerid] = true;
//other code here...
}
lets say they want to teleport to pk..
Код:
if(!strcmp(cmdtext,"/pk 4",true) || !strcmp(cmdtext,"/pk4",true))
{
if(InDmZone[playerid] == true)
{
GameTextForPlayer(playerid, "~y~type ~w~/kill",3000,3);
SendClientMessage(playerid, 0xE4BC1BFF, "SERVER: YOU MUST EXIT THE DM ZONE FIRST, TYPE /KILL !!");
}
else
{
//blah blah blah
}
return 1;
}
if(!strcmp(cmdtext, "/kill", true))
{
SetPlayerHealth(playerid, 0.0);
return 1;
}
OnPlayerDeath
Код:
if(InDmZone[playerid] == true)
{
InDmZone[playerid] = false;
SendClientMessage(playerid, 0xFF641AFF, "You have exited the DM zone !");
}
Onplayerconnect
Код:
InDmZone[playerid] = false;
taken from my gm
any questions?
yw