SA-MP Forums Archive
/setskin - 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: /setskin (/showthread.php?tid=102739)



/setskin - Jake Canfield - 17.10.2009

Hello there I have searched everywhee but I can't find a FS that is just a admin cmd that does /setskin as a single FS instead of a admin pack I can't seem to find.

If anyone has one please help me.


Re: /setskin - Donny_k - 17.10.2009

Take it out of the admin script then.


Re: /setskin - Jake Canfield - 17.10.2009

Lol to many cmds and to complicated anyone got one?


Re: /setskin - Donny_k - 17.10.2009

Quote:
Originally Posted by Jake Canfield
Lol to many cmds and to complicated anyone got one?
So what did you find on the wiki when looking, what did you find when searching for the function name, what have you tried, what is the current state of your code etc etc.


Re: /setskin - Sergei - 17.10.2009

pawn Код:
zcmd(setskin,playerid,params[])
{
  new targetid,skin;
  if(sscanf(params,"ud",targetid,skin)) SendClientMessage(playerid,WHITE,"/setskin [playerid] [skinid]");
  else if(targetid == INVALID_PLAYER_ID) SendClientMessage(playerid,RED,"Invalid player id");
  else
  {
    SetPlayerSkin(targetid,skin);
  }
}
Made with zcmd and sscanf.


Re: /setskin - Jake Canfield - 17.10.2009

Quote:
Originally Posted by $ЂЯĢ
pawn Код:
zcmd(setskin,playerid,params[])
{
  new targetid,skin;
  if(sscanf(params,"ud",targetid,skin)) SendClientMessage(playerid,WHITE,"/setskin [playerid] [skinid]");
  else if(targetid == INVALID_PLAYER_ID) SendClientMessage(playerid,RED,"Invalid player id");
  else
  {
    SetPlayerSkin(targetid,skin);
  }
}
Made with zcmd and sscanf.
What would I go about with that?


Re: /setskin - V1ceC1ty - 17.10.2009

wiki.sa-mp.com read it all and dont come back untill you know how to script GF from scratch.


Re: /setskin - Correlli - 17.10.2009

Quote:
Originally Posted by $ЂЯĢ
pawn Код:
zcmd(setskin,playerid,params[])
{
  new targetid,skin;
  if(sscanf(params,"ud",targetid,skin)) SendClientMessage(playerid,WHITE,"/setskin [playerid] [skinid]");
  else if(targetid == INVALID_PLAYER_ID) SendClientMessage(playerid,RED,"Invalid player id");
  else
  {
    SetPlayerSkin(targetid,skin);
  }
}
Made with zcmd and sscanf.
You should take a look at IsValidSkin-function (at wiki page), because not all skins are valid.


Re: /setskin - Sergei - 17.10.2009

It's fixed in 0.3 anyway, so it won't affect client (like crash) with any invalid things, so IsValidSkin is not needed really.
pawn Код:
zcmd(setskin,playerid,params[])
{
  new targetid,skin;
  if(sscanf(params,"ud",targetid,skin)) SendClientMessage(playerid,WHITE,"/setskin [playerid] [skinid]");
  else if(targetid == INVALID_PLAYER_ID) SendClientMessage(playerid,RED,"Invalid player id");
  else if(!IsValidSkin(skin)) SendClientMessage(playerid,RED,"Invalid skin id");
  else
  {
    SetPlayerSkin(targetid,skin);
  }
}
And Jake if you are asking what to do with this, you should really read some turtorials before comming back and asking again.