uzeo sam komandu make admin na ovaj nacin ali nisam navikao na njega pa nez sta trebam dodati
dcmd_makeadmin(playerid,params[]){
if(Account[playerid][pAdminlevel]>=CmdsOptions[MakeAdmin]) if(ServerInfo[MakeAdmin]==1){
new file2[256],tmp[256],tmp2[256],livello, Index; tmp = strtok(params,Index); tmp2 = strtok(params,Index);
if(!strlen(tmp)){
if(Options[Language]==1)SendClientMessage(playerid, COLOR_WHITE, "UTILIZZA: /makeadmin [id] [livello]");else
if(Options[Language]==2)SendClientMessage(playerid, COLOR_WHITE, "USAGE: /makeadmin [id] [level]");
return 1;}
player = strval(tmp);
livello = strval(tmp2);
if(IsPlayerConnected(player)){
GetPlayerName(player, incriminato, sizeof(incriminato));
format(file2, sizeof(file2), "ZASystem/Users/%s.sav", incriminato);
if(livello>Account[playerid][pAdminlevel]){
SendClientMessage(playerid,COLOR_LIGHTRED,"Non puoi dare un livello admin superiore al tuo!");
return 0;}else
if(livello>Options[MaxAdminLevel]){
SendClientMessage(playerid,COLOR_LIGHTRED,"ERRORE: Non puoi superare il massimo livello!!");
return 0;}else
GetPlayerName(player, incriminato, sizeof(incriminato)); GetPlayerName(playerid, adminname, sizeof(adminname));
format(string, sizeof(string), "Hai fatto admin livello %d %s", livello, incriminato); SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "[ADMIN]: %s ha fatto admin livello %d %s", adminname, livello, incriminato); SendClientMessageToAll(COLOR_LIGHTRED, string);
Account[player][pAdminlevel]=livello;
dini_IntSet(file2, "adminlevel", livello);}else{
if(Options[Language]==1)format(str, sizeof(str), "Devi avere livello admin %d per usare questo CMD!!!", CmdsOptions[MakeAdmin]), SendClientMessage(playerid, COLOR_LIGHTRED, str);else
if(Options[Language]==2)format(str, sizeof(str), "You must be admin level %d to use this CMD!!!", CmdsOptions[MakeAdmin]), SendClientMessage(playerid, COLOR_LIGHTRED, str);}}
return 1;}
kad ovo ubacim javlja mi ovo upozorenje znam da trebam nesto negdje ubacit al nez sta
C:\Documents and Settings\cvrÄak\Desktop\novi mod pravo\filterscripts\ladmin4v2.pwn(6771) : warning 203: symbol is never used: "dcmd_makeadmin"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.