How to Set Two Skins for one Faction/Team -
SaiyanZ - 16.04.2016
Hello
I'm new to samp and i have one question, I made teams using gteam one skin per team, I wanna know how do i make Two skins for one team, Here are my team codes.
Code:
#define Green 0
#define Yellow 1
#define Blue 2
#define Red 3
And down.
Code:
AddPlayerClass(287, 1382.8832,794.5979,10.8280,177.3541, 33, 1000, 24, 1000, 25, 1000);
AddPlayerClass(124, 754.6019,274.7502,27.3949,3.6705, 33, 1000, 24, 1000, 25, 1000);
AddPlayerClass(73, 1511.1772,-71.0189,19.8995,85.5210, 33, 1000, 24, 1000, 25, 1000);
AddPlayerClass(117, 1019.3360,-287.2638,73.9931,178.4066, 33, 1000, 24, 1000, 25, 1000);r
And More Down
Code:
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
if(classid == 0) {
SetPlayerSkin(playerid, 287);
GameTextForPlayer(playerid,"~G~Green",1000,4);
SetPlayerColor(playerid, GREEN_COLOR);
gTeam[playerid] = 0;
}
if(classid == 1) {
SetPlayerSkin(playerid, 124);
GameTextForPlayer(playerid,"~Y~Yellow",1000,4);
SetPlayerColor(playerid, YELLOW_COLOR);
gTeam[playerid] = 2;
}
if(classid == 2) {
SetPlayerSkin(playerid, 73);
GameTextForPlayer(playerid,"~B~Blue",1000,4);
SetPlayerColor(playerid, BLUE_COLOR);
gTeam[playerid] = 2;
}
if(classid == 3) {
SetPlayerSkin(playerid, 117);
GameTextForPlayer(playerid,"~R~Red",1000,4);
SetPlayerColor(playerid, RED_COLOR);
gTeam[playerid] = 0;
}
return 1;
}
Re: How to Set Two Skins for one Faction/Team -
[WSF]ThA_Devil - 16.04.2016
Set gTeam[playerid] to the same number for the skins that are in same team.
Re: How to Set Two Skins for one Faction/Team -
SyS - 16.04.2016
PHP Code:
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
if(classid == 0)
{
new skin1[] ={287,56}; //secondary skin is 56
new Random = random(sizeof(skin1));
SetPlayerSkin(playerid, skin1[Random]);
GameTextForPlayer(playerid,"~G~Green",1000,4);
SetPlayerColor(playerid, GREEN_COLOR);
gTeam[playerid] = 0;
}
do this for rest of codes Note it will randomly give players skin
Re: How to Set Two Skins for one Faction/Team -
SaiyanZ - 16.04.2016
Thank you, But any way through which player select skin by themself, 2 Options?
Re: How to Set Two Skins for one Faction/Team -
SyS - 16.04.2016
make another dialog let it be its id skin selection
first define it @ top of the script
PHP Code:
#define DIALOG_SKIN 456 //change the no according to your wish
now on this part
PHP Code:
if(classid == 0) {
SetPlayerSkin(playerid, 287);
GameTextForPlayer(playerid,"~G~Green",1000,4);
SetPlayerColor(playerid, GREEN_COLOR);
gTeam[playerid] = 0;
ShowPlayerDialog(playerid,DIALOG_SKIN,DIALOG_STYLE_LIST,"Select Skin","Skin 1 for class 0 \nSkin2 for class 0");//name it as your own wish but remember this is only for this class
}
if(classid == 1) {
SetPlayerSkin(playerid, 124);
GameTextForPlayer(playerid,"~Y~Yellow",1000,4);
SetPlayerColor(playerid, YELLOW_COLOR);
gTeam[playerid] = 2;
ShowPlayerDialog(playerid,DIALOG_SKIN,DIALOG_STYLE_LIST,"Select Skin","Skin for class 1 \nSkin 2 class 1");//name it as your own wish but remember this is only for this class
}
//do same for rest..................
now on ondialogresponse
PHP Code:
if(dialogid == DIALOG_SKIN)
{
if(response)
{
if( gTeam[playerid] == 0)//for the team 1
{
switch(listitem)
{
case 0 : return SetPlayerSkin(playerid,skinidhere);
case 1:return SetPlayerSkin(playerid,skinidhere);
}
}
if( gTeam[playerid] == 1)//for the team 2
{
switch(listitem)
{
case 0 : return SetPlayerSkin(playerid,skinidhere);
case 1:return SetPlayerSkin(playerid,skinidhere);
}
}
}
}
i personally dont tested it but it works as you want
Re: How to Set Two Skins for one Faction/Team -
SaiyanZ - 17.04.2016
Thanks for trying but its not working, I found a way by myself
+Rep for you.
Re: How to Set Two Skins for one Faction/Team -
Susenkus - 12.03.2019
Can you pls help me, i wanna make this too but i wanna to do it like the would show in the class selection like there were you have the AddPlayerClass, you know what i mean pls help
Re: How to Set Two Skins for one Faction/Team -
Susenkus - 13.03.2019
******Rep++ thx