Help needed
#1

Hello!
I want to make a tele cmd if a player use it then he will teleport to any other place.To exit that place he have to type /kill otherwise he cant use any cmds in that area, only /kill he can use to exit
How to make?

tele cmd
pawn Код:
CMD:dm1(playerid,params[]){
    #pragma unused params
    SetPlayerPos(playerid,x,y,z);
    return 1;}
Reply
#2

Sec okay
Reply
#3

pawn Код:
#include a_samp
#include zcmd

//Top of your Script;
new DeathMatch[MAX_PLAYERS];


public OnPlayerConnect(playerid)
{
    DeathMatch[playerid] = 0;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    DeathMatch[playerid] = 0;
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    DeathMatch[playerid] = 0;
    return 1;
}

CMD:dm1(playerid,params[])
{
    #pragma unused params
    SetPlayerPos(playerid,x,y,z);
    DeathMatch[playerid] = 1;
    return 1;
}

CMD:leave(playerid, params[])
{
    if(DeathMatch[playerid] == 0) //Checking;
    {
        SendClientMessage(playerid,-1,"You are not in Deathmatch Minigames to do that."); //>> Checked if u are not in DM
    }
    DeathMatch[playerid] = 0;
    SetPlayerPos(playerid, x,y,z);
    return 1;
}

//okay here i will show u how to disable other cmd when u in DeathMatch
CMD:yourothercommand(playerid, params[])
{
    if(DeathMatch[playerid]) return SendClientMessage(playerid, -1, "[ERROR]:{FFFFFF}You can't use these {FFFF00}commands {FFFFFF}if you are in {FF0000}DM {FFFF00}Minigames");
    //>> Your yourothercommand code here
    return 1;
}
Rep+ ? xDD joke
Reply
#4

Ty very much +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)