Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:setskin(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 3)
- {
- new string[128], giveplayerid, skinid;
- if(sscanf(params, "ud", giveplayerid, skinid)) return SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /setskin [Player] [skinid]");
- if(IsPlayerConnected(giveplayerid))
- {
- if(!IsInvalidSkin(skinid))
- {
- if(GetPlayerSkin(giveplayerid) == skinid)
- {
- SendClientMessageEx( playerid, COLOR_WHITE, "The person you're trying to change skins of already is using the skin you're trying to set." );
- }
- else
- {
- PlayerInfo[giveplayerid][pModel] = skinid;
- format(string, sizeof(string), "Your skin has been changed to ID %d by Administrator %s.", skinid, GetPlayerNameEx(playerid));
- SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
- format(string, sizeof(string), "You have given %s skin ID %d.", GetPlayerNameEx(giveplayerid), skinid);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pModel]);
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Invalid skin ID!");
- }
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "Ban Không Có Kha Nang Su Dung Lênh Này !");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement