Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMMAND:hostname(playerid, params[]) {
- if (GetPVarInt(playerid, "Admin") < 9) return SendClientMessage(playerid, COLOR_WHITE, "Insufficient admin rank!");
- if (GetPVarInt(playerid, "Delay") > GetCount()) return SendClientMessage(playerid, COLOR_LIGHTRED, "You must wait before performing this command!");
- SetPVarInt(playerid, "Delay", GetCount()+2000);
- new text[124];
- if(sscanf(params, "s[124]", text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /hostname [hostname]");
- else {
- if(strlen(text) > 124) return SendClientMessage(playerid, COLOR_WHITE, "Hostname too long. (124 characters max.)");
- new string[134]; //Padding for "hostname "
- format(string, sizeof(string), "hostname %s", text);
- SendRconCommand(string);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement