I'm new to scripting.
#1

Hello, I've decided that I want to script, I've followed Desksoft's tutorial, and all went perfectly, without any problem.
And now, I want to make a command, with zCMD, which the command is /valur, and when you type it, you get a hobo skin and a message that tells : ' Congratulations ! You are a valur ! '
Far as I understood, this is the script line for sending a message :
pawn Код:
SendClientMessage(playerid, COLOR_GREY, "Congratulation, you are a valur !);
But I didn't understood how to make that when you write /valur you get the hobo skin.
I think it's something with this ?
pawn Код:
GetPlayerSkin(5);
I'm not sure.
Reply
#2

You need to use the SetPlayerSkin function, which like it's name suggests, sets the skin of the specified player. You can find a list of available skin IDs here: https://sampwiki.blast.hk/wiki/Skins

For example, here is one you may be interested in using (ID 137): https://sampwiki.blast.hk/wiki/Image:Skin_137.png

An example how you would implement this into the command:
pawn Код:
COMMAND:valur( playerid, params[ ] )
{
   SetPlayerSkin( playerid, 137 ); // Set the player skin to ID 137
   SendClientMessage( playerid, COLOR_GREY, "Congratulation, you are a valur !" ); // Send the message
   return 1;
}
Reply
#3

EDIT:
too slow.
Reply
#4

Thanks, you are awesome.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)