Dm Help - 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: Dm Help (
/showthread.php?tid=297910)
Dm Help -
IvancheBG - 18.11.2011
Hi guys I am making my server and i make a dm command.Here it is :
Код:
if (strcmp("/dm1", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 1776.9133, -1801.5455, 52.4688);
SetPlayerFacingAngle(playerid, 0);
}
new string[128],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof(string)," %s Joined Dm1[RoRy's Deathmatch]",pName);
SendClientMessageToAll(COLOR_YELLOW,string);
return 1;
}
How to make when somebody type a tele command to show "You Need To Exit The Deathmatch First" and how to make a exit command to exit the dm ??
Re: Dm Help -
Kingunit - 18.11.2011
You need to create a new variable, set it to 1 if someone joins the DM and set it to 0 of someone exits the DM zone. After that you can check if like:
Re: Dm Help -
KosmasRego - 18.11.2011
pawn Код:
if(DM == 1)
{
SendClientMessage(playerid, [COLORHERE], "You need to exit the current deathmatch first.");
return 1;
}
else
{
SendClientMessage(playerid, [COLORHERE], "Welcome to DM 1.");
}
Re: Dm Help -
IvancheBG - 18.11.2011
Can you tell me the variable ??