10.04.2012, 20:00
how to create this cmd in to /changepass [ID/Name of Player] [New Pass] ONLY ADMIN 1337-1338
Код:
if(strcmp(cmd, "/changepass", true) == 0 || strcmp(cmd, "/promjenipass", true) == 0) // by Ellis { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "Morate prvo da se prijavite."); return 1; } else { SendClientMessage(playerid, COLOR_GREY, "Ova funkcija dolazi sa sledecim update-om"); } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "Koristi: /promjenipass [password]"); return 1; } strmid(PlayerInfo[playerid][pKey], tmp, 0, strlen(cmdtext), 255); SacuvajIgraca(playerid); SendClientMessage(playerid, COLOR_YELLOW, "Password je uspesno promjenjen"); } return 1; }