30.04.2009, 16:24
hi i need help with skins /skin <skinid> that way you can set to whatever skin you want
how to create that plzz help me
ttyy
how to create that plzz help me
ttyy
Originally Posted by Weirdosport
Download debugger and use /s <skinid>
|
Originally Posted by MenaceX^
Use strtok and SetPlayerSkin(playerid,strval(strtokvarieble));
|
if(strcmp(cmd, "/setskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setskin [playerid/PartOfName] [skin model]");
return 1;
}
new playa;
new skin;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
skin = strval(tmp);
if(skin < 0 || skin > 299)
{
SendClientMessage(playerid, COLOR_GREY, "The Skin ID can't be below 0 or above 300 !");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1338)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
giveplayerid = ReturnUser(tmp);
PlayerInfo[playa][pModel] = skin;
PlayerInfo[playa][pChar] = skin;
SetPlayerSkin(playa, PlayerInfo[playa][pChar]);
format(string, sizeof(string), "* You have changed the skin to %s !", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has changed your skin !", sendername);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, ADMIN_TEXT);
return 1;
}
}
return 1;
}