Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

24/10/2019 [Tutorial] [TUT] Random Skins - SA-MP Forums

SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials User Name User Name Remember Me?
[Tutorial] [TUT] Random Skins Password Log in
Ne w Account Com m unity Today's Pos ts Se arch

Page 1 of 2 1 2 >

Thre ad Tools Dis play M ode s

05/04/2010, 02:21
#1
AM

PatrickChucky [TUT] Random Skins


Big C lucker
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!

Join Date: Nov 2009 Through the command:


Location: Portugal
Posts: 138
Reputation: 0 Over public OnGameModeInit()

C ode:

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[])

C ode:

if(strcmp(cmd, /testcmd, true) == 0)


{
SetPlayerSkin(skins[random(3)];
}

now Through the spawn:

Over public OnGameModeInit()

C ode:

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)

C ode:

{
SetPlayerSkin(playerid, skins[random(3)]); //[random(3)] -->>> the 3 is the numver of skins you but in public
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

__________________
[GM]Chucky DM
[MAP]Hospital Interior
[MAP]Prison Outside
[MAP]Village

https://forum.sa-mp.com/showthread.php?t=139456 1/4
24/10/2019 [Tutorial] [TUT] Random Skins - SA-MP Forums
22/05/2010, #
11:16 PM

zSuYaNw Re: [TUT] Random Skins


Godfather
Quote:
Originally Posted by [PT
PatrickChucky™ ]
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!
Join Date: Apr
2010 Through the command:
Location:
Santa C atarina Over public OnGameModeInit()
Posts: 6,848
Reputation: C ode:
665
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[])

C ode:
if(strcmp(cmd, /testcmd, true) == 0)
{
SetPlayerSkin(skins[random(3)];
}

now Through the spawn:

Over public OnGameModeInit()

C ode:
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)

C ode:
{
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

God
__________________

Grupo do Fórum SA-MP no WhatsApp PM*

22/05/2010, 11:43 PM #3

Antonio [G-RP] Re: [TUT] Random Skins


High-roller
Centering it makes it look wierd..
__________________
Join Date: Jul 2009 If I've helped you at all, give me a REP. It's appreciated.
Location: C anada
Posts: 1,114
Reputation: 4

18/06/2010, 12:23 PM #4

PatrickChucky Re: [TUT] Random Skins


Big C lucker

https://forum.sa-mp.com/showthread.php?t=139456 2/4
24/10/2019 [Tutorial] [TUT] Random Skins - SA-MP Forums
Quote:
Originally Posted by TheGarfield

God

God? or Good xD

Join Date: Nov 2009


Location: Portugal OFF
Posts: 138
Reputation: 0
(( ja vi que vc é BR eu sou PT obrigado))
__________________
[GM]Chucky DM
[MAP]Hospital Interior
[MAP]Prison Outside
[MAP]Village

18/06/2010, 12:27 PM #5

Flake. Re: [TUT] Random Skins


High-roller
hehe nice for beginner scripters

Join Date: Sep 2009


Location: 1400
Posts: 1,172
Reputation: 132

09/07/2010, 03:56 AM #6

Simon Re: [TUT] Random Skins


Huge C lucker
If you want a more flexible and easy to edit code then use "sizeof(skins)" instead of "3" for your random
number limit .
Join Date: Jan 2006
Location: New Zealand
Posts: 410
Reputation: 56

19/10/2012, 07:43 PM #7

dino_d_carter Re: [TUT] Random Skins


Big C lucker
Thx +rep
__________________
Join Date: Aug 2011
Location: Sweden, Serbia
Posts: 167
Reputation: 9

03/02/2013, 09:48 AM #8

InTeL_cOrE_i7 Re: [TUT] Random Skins


Big C lucker
or... lol just use this
Quote:
Join Date: Oct 2012
Posts: 50 SetPlayerSkin(playerid, 1+random(299));
Reputation: -25

03/02/2013,
#9
09:55 AM

iManakoss Re: [TUT] Random Skins


Little C lucker
Very nice Tut...
__________________
Join Date: Nov My recent tutorials
2012
Posts: 38 C ode:
Reputation: -1 [TUT]Creating Factions/Gangs

https://forum.sa-mp.com/showthread.php?t=139456 3/4
24/10/2019 [Tutorial] [TUT] Random Skins - SA-MP Forums

16/01/2014, 11:51 AM #10

NimaKhan Re: [TUT] Random Skins


Little C lucker
NICE

Join Date: Jan 2014


Posts: 8
Reputation: 0

Page 1 of 2 1 2 >

« Previous Thread | Next Thread »

Posting Rules

You may not post new threads


You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post

Random payment to Random player ViruZZzZ_C hiLLL Help Archive 1 01/05/2010 05:43 PM

[Ajuda]Random skins PatrickC hucky Português/Portuguese 2 02/03/2010 07:48 PM

Random location + Random skin Naruto4 Help Archive 2 03/12/2009 04:07 PM

new mode = random(1); lets pawno crash + mode =


hipy Help Archive 3 23/07/2009 08:50 PM
random number FOR all public's

[Q] Array Problem Involving random skins [ERP]Snow Help Archive 3 19/07/2009 11:17 AM

All times are GMT. The time now is 01:22 AM.

-- (EN) English SA-MP - Archive - Top

Powered by vBulletin® Version 3.8.6


C opyright ©2000 - 2019, Jelsoft Enterprises Ltd.

https://forum.sa-mp.com/showthread.php?t=139456 4/4

You might also like