25.06.2013, 20:18
й muito facil
pawn Код:
if(strcmp(cmd, "/setarvip", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return 0;
new tmp[256];
new Dias;
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0x008040AA, "| ERRO | Use: /setarvip [id] [dias].");
return 1;
}
tmp = strtok(cmdtext, idx);
Dias = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0x008040AA, "| ERRO | Use: /setarvip [id] [dias].");
return 1;
}
plid = strval(tmp);
if(IsPlayerConnected(plid))
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), P_CONTAS, pname);
dini_IntSet(file2, "VIP",1);
dini_IntSet(file2,"Vipvencido",getdate());
dini_IntSet(file2,"Dias",Dias);
dini_IntSet(file2, "VIP",1);
SpawnPlayer(plid);
format(string, sizeof(string), "» O Administrador deu VIP para %s de %d dias ", pname, Dias, tmp);
SendClientMessage ( playerid, -1, string ) ;
return 1;
}
else
{
SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} ID invбlido");
return 1;
}
}