04.06.2013, 01:25
galera pq quando eu digito /darvip id o server-samp ele fecha o server cai... nгo sei pq, e mais uma coisa se esse cod de dias estб correto
pawn Код:
if(strcmp(cmd, "/Darvip", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 5){
}
new tmp[256];
new plid;
new year, month,day;
new hour, minute, second;
new giveplayer[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, 0x008040AA, "{0099FF}[x]{CCCCFF} 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), PASTA_Vips, pname);
getdate(year, month, day);
gettime(hour,minute,second);
format(string, sizeof(string), "%s deu vip ao %s nнvel %d (%d/%d/%d - %d:%d)",sendername,giveplayer,day, month, year,hour, minute);
dini_IntSet(file2, "VIP",1);
SpawnPlayer(plid);
SendClientMessage(playerid, 0x00FF00AA, "{0099FF}(~){CCCCFF} VIP Setado com sucesso");
SendClientMessage(plid, 0x00FF00AA, "{0099FF}(~){CCCCFF} O Administrador(a)%s Ti Deu VIP de %d Dias aproveite");
return 1;
}else{
SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} ID invбlido");
return 1;
}
}