neeed help with skins - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: neeed help with skins (
/showthread.php?tid=75290)
neeed help with skins -
luckie12 - 30.04.2009
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
Re: neeed help with skins -
Weirdosport - 30.04.2009
Download debugger and use /s <skinid>
Re: neeed help with skins -
luckie12 - 30.04.2009
Quote:
Originally Posted by Weirdosport
Download debugger and use /s <skinid>
|
thats take many times?
i whant that the player can choose the skin with /skin <skinid>
Re: neeed help with skins -
MenaceX^ - 30.04.2009
Use strtok and SetPlayerSkin(playerid,strval(strtokvarieble));
Re: neeed help with skins -
luckie12 - 30.04.2009
Quote:
Originally Posted by MenaceX^
Use strtok and SetPlayerSkin(playerid,strval(strtokvarieble));
|
hmm
need i download strtok?
Re: neeed help with skins -
Danut - 30.04.2009
pawn Код:
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;
}
Re: neeed help with skins -
HB - 30.04.2009
Moro, I understand that you're trying to help him, but your command isn't helping.. (Get that? :P) The command assigns a skin to a player id. Since he probably is new at scripting he can't remove the assign skin to playerid part.
lucky12, I really advice you to look at the dcmd and sscanf function(search for it).