05.06.2015, 12:06
Hello i tried to add the new 0.3.7 skins but its not working so yeah
CMD:skin(playerid, params[]) { new skinid; if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, 0xFF0000FF, "/skin <0-311>"); { if(skinid < 0 || skinid > 311) return SendClientMessage(playerid, 0xFF0000FF, "Don't go lower than 0, or higher than 311"); SetPlayerSkin(playerid, skinid); } return 1; }
Add new 0.3.7 skins?
Код:
CMD:skin(playerid, params[]) { new skinid; if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, 0xFF0000FF, "/skin <0-311>"); { if(skinid < 0 || skinid > 311) return SendClientMessage(playerid, 0xFF0000FF, "Don't go lower than 0, or higher than 311"); SetPlayerSkin(playerid, skinid); } return 1; } edit; if you could provide your own code, that'd be great |
CMD:setskin(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] >= 3) {
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 6)
return SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
new
string[128],
giveplayerid,
skinid;
if(sscanf(params, "ud", giveplayerid, skinid))
return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [playerid/partofname] [skinid]");
if(giveplayerid != INVALID_PLAYER_ID) {
if(!IsInvalidSkin(skinid)) {
if(GetPlayerSkin(giveplayerid) == skinid)
return SendClientMessage(playerid, COLOR_WHITE, "That player is already wearing the skin you chose.");
if(AdminDuty[giveplayerid] == 0 || giveplayerid == playerid) {
PlayerInfo[giveplayerid][pSkin] = skinid;
format(string, sizeof(string), "Your skin has been changed to ID %d by Admin %s.", skinid, GetPlayerNameEx(playerid));
SendClientMessage(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string), "You have given %s skin ID %d.", GetPlayerNameEx(giveplayerid), skinid);
SendClientMessage(playerid, COLOR_WHITE, string);
SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pSkin]);
} else return SendClientMessage(playerid, COLOR_GRAD1, "You can't set skins for on-duty admins, unless you're setting your own skin.");
}
else return SendClientMessage(playerid, COLOR_GREY, "Invalid skin ID!");
}
}
else return SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
return 1;
}
SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pSkin]);
PlayerInfo[giveplayerid][pSkin] = skinid; SetPlayerSkin(giveplayerid, skinid);
PlayerInfo[giveplayerid][pSkin] = skinid; SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pSkin]);