[Ajuda] Rapido Aqui
#1

eu tenho esse codigo aqui

if(strcmp(cmdtext, "/minigun", true) == 0)
{
SetPlayerPos(playerid,283.6217,-136.7550,1004.0625);
new pname[MAX_PLAYER_NAME];
SetPlayerInterior(playerid,7);
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{FF0000}%s {FFFFFF}foi na batalha de minigun {FF0000}( /minigun )", pname);
SendClientMessageToAll(COLOR_BRANCA, string);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 38, 99999);
return 1;
}
//

Agora tem como eu fazer para quando o player tiver dentro do teleporte ele nao usa nenhum comando apenas /sairdm? preciso muito dessa ajuda
Reply
#2

Tente

pawn Code:
new NaDM[MAX_PLAYERS];

public OnPlayerCommandText(playerid,cmdtext[])
{
    if(NaDM[playerid] == 1 && strcmp(cmdtext, "/sairdm", true) != 0)
    {
        SendClientMessage(playerid, -1,"[ERRO] Vocк estб na DM e sу pode digitar o comando /sairdm");
        return 0;
    }
    if(strcmp(cmdtext, "/minigun", true) == 0)
    {
        NaDM[playerid] = 1;
        SetPlayerPos(playerid,283.6217,-136.7550,1004.0625);
        new pname[MAX_PLAYER_NAME];
        SetPlayerInterior(playerid,7);
        GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
        format(string, sizeof(string), "{FF0000}%s {FFFFFF}foi na batalha de minigun {FF0000}( /minigun )", pname);
        SendClientMessageToAll(COLOR_BRANCA, string);
        PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(playerid, 38, 99999);
        return 1;
    }
    if(strcmp(cmdtext, "/sairdm", true) == 0)
    {
       if(NaDM[playerid] == 0) return SendClientMessage(playerid, -1, "[ERRO] Vocк nгo estб na DM");
       SendClientMessage(playerid, -1, "[ SERV ] Voce saiu da DM.");
       SetPlayerPos(playerid, CordX, CordY, CordZ);
       NaDM[playerid] = 0;
       return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)