#7

pawn Код:
#include a_samp
#include zcmd

new Minigame[MAX_PLAYERS]; //your variables

public OnPlayerConnect(playerid)
{
    Minigame[playerid] = 0; //Relog/Reconnect will remove u from the DM :)
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    Minigame[playerid] = 0; //when player disconnect he will automatically remove from DM
    return 1;
}

CMD:playdm(playerid, params[])
{
    if(Minigame[playerid] == 1) return SendClientMessage(playerid,-1,"type /kill to exit from this Mini Game.");
    //Your cords here
    return 1;
}

CMD:kill(playerid, params[])
{
    SetPlayerHealth(playerid, 0); //Setplayerhealth to 0
    Minigame[playerid] = 0; //this will remove the player from dm
    return 1;
}

//if you want to disable other cmd when u in DM , this is the example

CMD:v(playerid, params[])
{
    if(Minigame[playerid] == 1)
    {
        SendClientMessage(playerid, -1,"You cant use this commands if you are in DM minigames");
    }
    //your cords
    return 1;
}
try this
Reply


Messages In This Thread
Help - by P<3TS - 01.08.2012, 10:15
Re: Help - by Misiur - 01.08.2012, 10:21
Re: Help - by P<3TS - 01.08.2012, 10:34
Re: Help - by Misiur - 01.08.2012, 10:37
Re: Help - by Devilxz97 - 01.08.2012, 10:41
Re: Help - by P<3TS - 01.08.2012, 10:48
Re: Help - by Devilxz97 - 01.08.2012, 10:48

Forum Jump:


Users browsing this thread: 2 Guest(s)