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