Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/deleteaccount", true)==0)
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /deleteaccount [name]");
- return 1;
- }
- strmid(sendername, PlayerRPName(playerid), 0, MAX_PLAYER_NAME);
- format(string,sizeof(string),"%s.ini",tmp);
- if(dini_Int(string, "AdminLvl") > PlayerInfo[playerid][pAdmin])
- {
- SendClientMessage(playerid, COLOR_GREY, "You can't delete accounts of higher level Admins !");
- return 1;
- }
- if(fexist(string))
- {
- fremove(string);
- format(string, sizeof(string), "{FF0000}AdmWarning{FFFFFF}: %s was deleted by %s.", tmp, sendername);
- ABroadCast(COLOR_WHITE,string,1);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " That account doesn't exist.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not authorized to use this command.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement