SA-MP Forums Archive
DM Zone command problems - 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: DM Zone command problems (/showthread.php?tid=139143)



DM Zone command problems - _Vortex - 04.04.2010

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.


Re: DM Zone command problems - Lajko1 - 04.04.2010

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;
}



Re: DM Zone command problems - _Vortex - 04.04.2010

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