DM Zone command problems
#1

Hey, so I have this DM thing i'm trying to code, and basically what it does is when you first connect it sets "IsDM[playerid]" to 0, to indicate that you're not in DM mode, once someone types in a dm command such as "/dm1" it sets their location, and it sets "IsDM[playerid]" to 1 to indicate that they're in DM zone, if they die, it's supose to set it to 0, the same thing is supose to happen when they try to end DM mode (/ldm), but its not working, it stays set to 1.

So when someone wants to leave dm mode, or switch dm areas, they get "You're still in DM mode" even though they've died or /ldm.

Here's the code,
http://pastebin.com/1XRVPtCk

At when you first try joining a DM zone, when you first join the server, it lets you, but after that, no.
Reply
#2

i think i found mistake

at /lfm u have

Код:
dcmd_ldm(playerid, cmdtext[])
{
    #pragma unused cmdtext
    if(IsDM[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You're not in DM mode.");
    IsDM[playerid] = 1;
    SpawnPlayer(playerid);
    SendClientMessage(playerid,COLOR_YELLOW,"DM Mode stopped.");
    return 1;
}
edit to:

Код:
dcmd_ldm(playerid, cmdtext[])
{
    #pragma unused cmdtext
    if(IsDM[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You're not in DM mode.");
    IsDM[playerid] = 0;
    SpawnPlayer(playerid);
    SendClientMessage(playerid,COLOR_YELLOW,"DM Mode stopped.");
    return 1;
}
Reply
#3

Thanks, I don't know how I missed that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)