/setskin
#1

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.
Reply
#2

Take it out of the admin script then.
Reply
#3

Lol to many cmds and to complicated anyone got one?
Reply
#4

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.
Reply
#5

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.
Reply
#6

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?
Reply
#7

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

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.
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)