need help
#1

pawn Код:
CMD:drift1(playerid, params[])
{
 new string[256];
    if(DM[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_RED, "You cant use this command while in DeathMatch");
    }
    if(Spawned[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_RED, "You are not spawned you cant use this command");
    }
    else if(Spawned[playerid] == 1)
    {
     SetPlayerPos(playerid, -299.4920,1537.1998,75.5625);
     format(string, sizeof(string), "(%d)%s has teleported himself to (/drift1)", playerid, getPlayerName(playerid));
     SendClientMessageToAll(COLOR_RED, string);
    }
    return 1;
}
THIS WONT WORK:
pawn Код:
if(DM[playerid] == 1)
 {
        SendClientMessage(playerid, COLOR_RED, "You cant use this command while in DeathMatch");
 }
Reply
#2

1) do you do DM[playerid] = 1; in any where that the player can enter dm area?

if you already had step 1:

try this

pawn Код:
if(DM[playerid] == 1)
 {
        SendClientMessage(playerid, COLOR_RED, "You cant use this command while in DeathMatch");
        return 1;
 }
Reply
#3

EDIT: YOU CODE WORKING THANKS
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)