19.02.2013, 06:52
Is there any way to remove tha sscanf from this cmd and put it into strcmp
If yes pls post it or help me in any way i need it asap
If yes pls post it or help me in any way i need it asap
Код:
if(strcmp(cmd,"/offpostaviadmina",true)==0) { if(PlayerInfo[playerid][pAdmin] < 1338) return SCM(playerid,COLOR_WHITE,"Nisi ovlascen da koristis ovu komandu"); new string[256]; new sendername[MAX_PLAYER_NAME]; new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); new level; if(sscanf(params,"sd",playername,level)) return SCM(playerid, COLOR_GREY,"{00C0FF}Koriscenje:{ffffff} /offpostaviadmina [Ime_Prezime] [Administrator level]"); if(AccountVanIGre(playername)) { OffLogiranje(playername); PlayerInfo[MAX_PLAYERS][pAdmin] = level; OffCuvanje(playername); format(string, sizeof(string), "[OFFLINE] Admin: %s je dao Admina igracu %s || Admin Level; %d",sendername,playername,level); PosaljiAdminimaPoruku(COLOR_YELLOW,string); } return 1; }