Dm Help
#1

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

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:
pawn Код:
if(DM == 1)
{
//
}
Reply
#3

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.");
}
Reply
#4

Can you tell me the variable ??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)