Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- CMD:skin(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, 0xFF0000FF, "Error: You must be an RCON admin to use this command!");
- return 1;
- }
- new skinid;
- if(sscanf(params, "i", skinid))
- {
- SendClientMessage(playerid, 0xFFFF00FF, "Usage: /skin [skin_id]");
- SendClientMessage(playerid, 0xFFFF00FF, "Valid IDs: 11754-12799, 13891-14257");
- return 1;
- }
- new bool:isValid = (skinid >= 11754 && skinid <= 12799) || (skinid >= 13891 && skinid <= 14257);
- switch(isValid)
- {
- case true:
- {
- SetPlayerSkin(playerid, skinid);
- new string[128];
- format(string, sizeof(string), "You have changed your skin to ID %d.", skinid);
- SendClientMessage(playerid, 0x00FF00FF, string);
- }
- case false:
- {
- SendClientMessage(playerid, 0xFF0000FF, "Error: Invalid skin ID! Valid IDs: 11754-12799, 13891-14257");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement