que hago aka............
#2

Intenta asн:

pawn Код:
if (strcmp("/setvip", cmdtext, true) == 0)
    {
    if (IsPlayerAdmin(playerid))
    {
    new tmp1[128], tmp2[128], jugador, usador, string1[256], string2[256], nombreusador[MAX_PLAYER_NAME], nombrejugador[MAX_PLAYER_NAME], archivo[256];
    strcat(tmp1, strtok(cmdtext, idx));
    strcat(tmp2, strtok(cmdtext, idx));
    if (!strlen(tmp1) || !strlen(tmp2)) return SendClientMessage(playerid, COLOR_ROJO, "[Error] Usa: /setvip [ID] [DEL 0 AL 4].");
    jugador = strval(tmp1);
    usador = playerid;
    if (IsPlayerConnected(jugador))
    {
    if (strval(tmp2) < 0 || strval(tmp2) > 4) return SendClientMessage(playerid, COLOR_ROJO, "[Error]: El nivel V.I.P es solo entre 0 y 4.");
    if(strval(tmp2) == Informacion[jugador][Premium]) return SendClientMessage(playerid, COLOR_ROJO, "[Error]: El jugador ya tiene ese nivel V.I.P.");
    GetPlayerName(jugador, nombrejugador, MAX_PLAYER_NAME);
    GetPlayerName(usador, nombreusador, MAX_PLAYER_NAME);
    format(string1, 256, "[Admin] %s Te Ha otorgado una cuenta V.I.P de nivel : %d.", nombreusador,strval(tmp2));
    format(string2, 256, "[Admin] Has otorgado una cuenta V.I.P de nivel : %d a %s.", strval(tmp2), nombrejugador);
    SendClientMessage(jugador, COLOR_VERDE_CLARO, string1);
    SendClientMessage(usador, COLOR_VERDE_CLARO, string2);
    PlayerPlaySound(jugador, 1057, 0.0, 0.0, 0.0);
    Informacion[jugador][Premium] = strval(tmp2);
    format(archivo, 256, "V.I.P/Usuarios/%s.ini", nombrejugador);
    dini_IntSet(archivo, "V.I.P", strval(tmp2));
    }
    else return SendClientMessage(playerid, COLOR_ROJO, "[Error]: Jugador no Contectado");
    }
    else return SendClientMessage(playerid, COLOR_ROJO, "[Error]: Comando Solo Para Admin Rcon!");
    return 1;
    }
Reply


Messages In This Thread
que hago aka............ - by Parka - 14.10.2011, 15:54
Respuesta: que hago aka............ - by OPremium - 14.10.2011, 16:25
Re: que hago aka............ - by WLSF - 14.10.2011, 16:34
Respuesta: que hago aka............ - by Parka - 14.10.2011, 16:51
Re: que hago aka............ - by WLSF - 14.10.2011, 16:57
Respuesta: que hago aka............ - by Parka - 14.10.2011, 17:17
Re: que hago aka............ - by WLSF - 15.10.2011, 19:56

Forum Jump:


Users browsing this thread: 1 Guest(s)