Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:setrank(playerid,params[])
- {
- if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You must be in a gang for use this command.");
- //if(PlayerInfo[playerid][Gangrank] <= 2) return SendClientMessage(playerid, 0xff0000ff, "ERROR: Your need Co-Leader rank in gang for use this command.");
- if(sscanf(params, "u", ids)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/Setrank [playerid]");
- if(!IsPlayerConnected(ids)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}That player isn't connected.");
- //if(PlayerInfo[playerid][Gangrank] <= PlayerInfo[ID][Gangrank]) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You can't change this player rank.");
- //ids = ID ;
- ShowPlayerDialog(playerid,DIALOG_GRANK,DIALOG_STYLE_LIST, "Set gang rank", "Member\nCo-leader\nLeader\nCo-Owner\nOwner\n{FF0000}Founder", "Select", "Close");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_GRANK)
- {
- if(response)
- {
- if(listitem == 0)
- {
- PlayerInfo[ids][Gangrank] =1;
- }
- if(listitem == 1)
- {
- PlayerInfo[ids][Gangrank] =2;
- }
- if(listitem == 2)
- {
- PlayerInfo[ids][Gangrank] =3;
- }
- if(listitem == 3)
- {
- PlayerInfo[ids][Gangrank] =4;
- }
- if(listitem == 4)
- {
- PlayerInfo[ids][Gangrank] =5;
- }
- if(listitem == 5)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to set this rank.");
- PlayerInfo[ids][Gangrank] =6;
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement