Ajuda no "SETLEVEL" comando
#2

@Blackwave:

Tente:

sу eu para entender esses cуdigos grudados,pqp
pawn Код:
new
    tmp[256],
    tmp2[256],
    Index
;

tmp = strtok(params,Index),
tmp2 = strtok(params,Index);

if(!strlen(params))
    return SendClientMessage(playerid, VERMELHO, "USAGE: /setlevel [playerid] [level]");
new
    player1,
    level,
        file[64],
    playername[24],
    adminname[24],
    string[128]
;

GetPlayerName(playerid, playername, 24);
GetPlayerName(playerid, adminname, 24);
player1 = strval(tmp);
level = strval(tmp2);

if(!strlen(tmp2))
    return SendClientMessage(playerid, VERMELHO, "USAGE: /setlevel [playerid] [level]");

if(!IsPlayerConnected(player1))
    return SendClientMessage(playerid, VERMELHO, "Player nгo conectado");

if(level > MAX_LEVEL)
    return SendClientMessage(playerid, VERMELHO, "Level maximo й 100. Escolha igual ou menor a 100");

format(string,sizeof(string),"ADMIN: %s mudou o level de %s para %d", adminname, playername, level);
PlayerInfo[player1][Level] = level;
format(file, sizeof(file), SERVER_USER_FILE, name);
dini_IntSet(file, "level", PlayerInfo[playerid][Level]);
return SendClientMessageToAll(BRANCO, string);
Reply


Messages In This Thread
Ajuda no "SETLEVEL" comando - by blackwave - 14.11.2010, 23:22
Re: Ajuda no "SETLEVEL" comando - by ipsBruno - 14.11.2010, 23:45
Re: Ajuda no "SETLEVEL" comando - by blackwave - 14.11.2010, 23:57
Re: Ajuda no "SETLEVEL" comando - by ipsBruno - 15.11.2010, 00:00
Re: Ajuda no "SETLEVEL" comando - by blackwave - 15.11.2010, 00:02
Re: Ajuda no "SETLEVEL" comando - by ipsBruno - 15.11.2010, 00:03
Re: Ajuda no "SETLEVEL" comando - by blackwave - 15.11.2010, 00:05
Re: Ajuda no "SETLEVEL" comando - by ipsBruno - 15.11.2010, 00:07
Re: Ajuda no "SETLEVEL" comando - by blackwave - 15.11.2010, 00:10

Forum Jump:


Users browsing this thread: 2 Guest(s)