Dm arenas
#1

hey guys can you help me...emm i wonder how i can make it to my script so when they are teleported to dm arenas then they have to press /exitdm to exit
Regards,Blacklisted
Reply
#2

pawn Код:
SendClientMessage(playerid, -1,"Type /exitdm to exit the arena.");
?

If for real, then you have to use OnPlayerKeyStateChange.
Reply
#3

pawn Код:
new bool:pDM[MAX_PLAYERS];

CMD:dmenter(playerid, o[])
{
    pDM[playerid] = 1
        SetPlayerPos(playerid, X, Y, Z);
    return 1;
}


CMD:lsa(playerid, o[])
{
    if(pDM[playerid] == 1) {
        SendClientMessage(playerid, COLOR, "You cannot teleport. Use /dmexit");
    }
    else {
        SetPlayerPos(playerid, X, Y, Z);
    }
    return 1;
}


CMD:dmexit(playerid, o[])
{
    if(pDM[playerid] == 0) {
        SendClientMessage(playerid, COLOR, "[ERROR]: You are not in the DM Zone!");
    }
    else {
        pDM[playerid] == 0
            SetPlayerPos(playerid, X, Y, Z);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)