01.05.2013, 17:15
Good Afternoon Members Forum SA-MP'm here to ask you about the help that I'm creating a command to identify the last login of a leader would like to help me? The n command to get this! help code bellow
Код:
if((strcmp(cmd, "/ull", true)==0 || strcmp(cmd, "/ulll", true) ==0) && PlayerInfo[playerid][pAdmin] == DONO) { new Info[6][10]; split(PlayerInfo[giveplayerid][pLastLogin],Info,'/'); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: /ull [Nick]"); if (PlayerInfo[playerid][pAdmin] != DONO) { SendClientMessage(playerid, COLOR_GREY,"You dont't Have permission use this command"); return true; } GetPlayerName(giveplayerid, sendername, sizeof(sendername)); format(string, sizeof(string), "Nick: %s ~ Last Login: %d/%d/%d Hour %d:%d:%d",sendername,strval(Info[0]),strval(Info[1]),strval(Info[2]),strval(Info[3]),strval(Info[4]),strval(Info[5])); SendClientMessage(playerid, COLOR_GRAD1, string); DateProp(giveplayerid); new dia,mes,ano,hora,mins,seg,string3[20]; getdate(ano,mes,dia); gettime(hora,mins,seg); format(string, sizeof(string),"%d/%d/%d/%d/%d/%d",dia,mes,ano,hora,mins,seg); strmid(PlayerInfo[giveplayerid][pLastLogin],string,0,strlen(string),255); return true; }