[Tutorial] [TUT] Random Skins
#1

Hi, I am PatrickChucky, and this is my first TUT.

Is about "How to create Random Skins

In this TUT i create random skins with command and at the spawn

Lets go!

Through the command:

Over public OnGameModeInit()

Код:
new skins[] = {
  0, //Here you put the id of the skin
  1, //Here you put the id of the skin
  2 //Here you put the id of the skin
};
now at public OnPlayerCommandText(playerid, cmdtext[])

Код:
if(strcmp(cmd, /testcmd, true) == 0)
{
    SetPlayerSkin(skins[random(3)];
}
now Through the spawn:

Over public OnGameModeInit()

Код:
new skins[] = {
  0, //Here you put the id of the skin
  1, //Here you put the id of the skin
  2 //Here you put the id of the skin
};
now at public OnPlayerSpawn(playerid)

Код:
{
  SetPlayerSkin(playerid, skins[random(3)]);	 //[random(3)] -->>> the 3 is the numver of skins you but in public OnGameModeInit
  return 1;
}

P.S: Remember, if you want more skins change the number in //[random(3)] to the number of skins you have

easy I think

Reply


Messages In This Thread
[TUT] Random Skins - by PatrickChucky - 05.04.2010, 02:21
Re: [TUT] Random Skins - by zSuYaNw - 22.05.2010, 23:16
Re: [TUT] Random Skins - by Antonio [G-RP] - 22.05.2010, 23:43
Re: [TUT] Random Skins - by PatrickChucky - 18.06.2010, 12:23
Re: [TUT] Random Skins - by Flake. - 18.06.2010, 12:27
Re: [TUT] Random Skins - by Simon - 09.07.2010, 03:56
Re: [TUT] Random Skins - by dino_d_carter - 19.10.2012, 19:43
Re: [TUT] Random Skins - by InTeL_cOrE_i7 - 03.02.2013, 09:48
Re: [TUT] Random Skins - by iManakoss - 03.02.2013, 09:55
Re: [TUT] Random Skins - by NimaKhan - 16.01.2014, 11:51

Forum Jump:


Users browsing this thread: 5 Guest(s)