(Basic Help Here)
#1

I have this CMD:

pawn Код:
dcmd_adminwar(playerid,params[]) {

    #pragma unused params
    if(BattlePhase != PHASE_NONE) switch(BattlePhase){
        case PHASE_ASK, PHASE_COUNT: return SystemMsg(playerid, "Alguien ya comenzo una batalla! /entrarguerra!");
        case PHASE_BATTLE: return SystemMsg(playerid, "Una batalla ya esta corriendo! Espera a que termine!");
        default: return SystemMsg(playerid, "No puedes empezar una batalla ahora!");
    }
        new num=GetNumOfPlayersReady();
            new string[150];
                dini_IntSet("Battles.ini",PlayerName(playerid), BATTLE_DDAY*(-1));
            if(num < MIN_PLAYERS_TO_START){
                if(MaxCount < MIN_PLAYERS_TO_START+COUNT_JOIN) MaxCount++;
                new RemainingP=MIN_PLAYERS_TO_START-num;
                if(RemainingP == 1) format(string, 150, "%s (ID: %d) Entra a la guerra! Aъn falta un jugador!!", PlayerName(playerid), playerid);
                else format(string, 150, "%s (ID: %d) Entra a la guerra! Aъn faltan %d jugadores!", PlayerName(playerid), playerid, RemainingP);
                for (new i=0; i<MAX_SERVER_SLOTS; i++) if(IsPlayerReady[i] && IsPlayerConnected(i)) SendClientMessage(i, COLOR_LIGHT_GREEN2, string);
            }
            return 1;
}
But I want like /adminwar [ID] Then the cmd executes 4 the Id selected.
Reply
#2

PHP код:
new
    
id;
if(
sscanf(params,"d"id)) return SendClientMessage(playerid, -1,"Usage: /adminwar [ID]"); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)