Advertisement
Guest User

Untitled

a guest
Aug 4th, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. CMD:sethours(playerid, params[])
  2. {
  3. new giveplayerid, hours, string[250];
  4.  
  5. if(AccInfo[playerid][AdminLevel] < 2) return SendClientMessage(playerid, 0xB3AFAFFF, "You are of insufficient administrator level to use this.");
  6. if(sscanf(params, "dd", giveplayerid, hours)) return SendClientMessage(playerid, 0xB3AFAFFF, "Usage:{FFFFFF} /sethours [playerid] [hours]");
  7. if(hours < 1 || hours > 9999) return SendClientMessage(playerid, 0xB3AFAFFF, "Hours must be between 1 and 9,999!");
  8. else if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, 0xB3AFAFFF, "That user is not connected!");
  9.  
  10. AccInfo[giveplayerid][PlayingHours] = hours;
  11. format(string, sizeof string, "You have set %s's hours to %d.", pName(giveplayerid), hours);
  12. SendClientMessage(playerid, -1, string);
  13.  
  14. format(string, sizeof string, "Your hours have been set to %d by %s", hours, pName(giveplayerid));
  15. SendClientMessage(playerid, -1, string);
  16. return 1;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement