[Pedido] Bloquear comandos em DM
#5

pawn Код:
if(strcmp(cmdtext, "/x1", true) == 0) {
    SetPlayerVirtualWorld(playerid,3);
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s foi para o {FF00FF}X1 {FF0000}( /x1 )", pname);
    SendClientMessageToAll(COLOR_YELLOW, string);
    ResetPlayerWeapons(playerid);
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid, -1416.3827, 1246.9246, 1039.8741);
    SetPlayerFacingAngle(playerid, 273.7604);
    SetPlayerArmour(playerid, 100.0);
    SetPlayerHealth(playerid, 100.0);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,4,0);
    GivePlayerWeapon(playerid,26,9999);
    GivePlayerWeapon(playerid,31,9999);
    GivePlayerWeapon(playerid,24,9999);
    GivePlayerWeapon(playerid,32,9999);
    SetPVarInt(playerid, "noX1", 1);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason) {

    if (GetPVarInt(playerid, "noX1") != 0 ) {
        DeletePVar(playerid, "noX1");
        DeletePVar(killerid, "noX1");
    }
    return 1;
}


// para bloquear os comandos para quem esta no x1 basta adicionar isto em cada comando

if (GetPVarInt(playerid, "noX1") == 1 )
    return SendClientMessage(playerid, -1, "Este comando nгo pode ser usado, pois vocк esta em um X1!");
Reply


Messages In This Thread
Bloquear comandos em DM - by xXCallXX - 02.02.2014, 01:14
Re: Bloquear comandos em DM - by Gii - 02.02.2014, 01:15
Re: Bloquear comandos em DM - by xXCallXX - 02.02.2014, 01:23
Re: Bloquear comandos em DM - by i7Core - 02.02.2014, 01:25
Re: Bloquear comandos em DM - by Gii - 02.02.2014, 01:27
Re: Bloquear comandos em DM - by xXCallXX - 02.02.2014, 01:44
Re: Bloquear comandos em DM - by Gii - 02.02.2014, 01:45
Re: Bloquear comandos em DM - by xXCallXX - 02.02.2014, 02:00

Forum Jump:


Users browsing this thread: 3 Guest(s)