SA-MP Forums Archive
Help needed - 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)
+--- Thread: Help needed (/showthread.php?tid=364313)



Help needed - P<3TS - 30.07.2012

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



Re: Help needed - Devilxz97 - 30.07.2012

Sec okay


Re: Help needed - Devilxz97 - 30.07.2012

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


Re: Help needed - P<3TS - 30.07.2012

Ty very much +rep