Skin problems
#1

Hey guys, i have this code

Code:
if(dialogid == DCLASS)
	{
	    if(response)
	    {
	        if(listitem == 0)
	       {
	            ResetPlayerWeapons(playerid);
	            gClass[playerid] = ASSAULT;
				GivePlayerWeapon(playerid,27,193);
				GivePlayerWeapon(playerid,31,210);
				GivePlayerWeapon(playerid,24,300);
				SendClientMessage(playerid,COLOR_PINK,"[INFO]:You have selected assault class for your class");
	        }
	        if(listitem == 1)
	        {
	            ResetPlayerWeapons(playerid);
	            gClass[playerid] = SNIPER;
	            GivePlayerWeapon(playerid,24,250);
	            GivePlayerWeapon(playerid,25,20);
	            GivePlayerWeapon(playerid,29,300);
                SendClientMessage(playerid,COLOR_PINK,"[INFO]:You have selected Sniper class for your class");
	        }
	        if(listitem == 2)
	        {
				if(GetPlayerScore(playerid)>1500)
				{
				    ResetPlayerWeapons(playerid);
					SendClientMessage(playerid,COLOR_PINK,"[INFO]:You have selected Engineer for your class");
					GivePlayerWeapon(playerid,27,450);
					GivePlayerWeapon(playerid,24,450);
					GivePlayerWeapon(playerid,31,500);
					GivePlayerWeapon(playerid,35,10);
					gClass[playerid] = ENGINEER;
				}
				else
				{
				    SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:1500 Scores required for this class!");
				    ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
				}
	        }
	        if(listitem == 3)
	        {
				if(GetPlayerScore(playerid)>1200)
				{
				    ResetPlayerWeapons(playerid);
				    SendClientMessage(playerid,COLOR_PINK,"[INFO]:You have selected Pilot for your class");
					GivePlayerWeapon(playerid,16,10);
					GivePlayerWeapon(playerid,27,300);
					GivePlayerWeapon(playerid,24,350);
					gClass[playerid] = PILOT;
				}
				else
				{
				    SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:1200 Scores required for this class!");
				    ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
				}
	        }
			if(listitem == 4)
			{
				if(PlayerInfo[playerid][pVip]>0)
				{
				    ResetPlayerWeapons(playerid);
				    SendClientMessage(playerid,COLOR_PINK,"[INFO]:You have selected Medic for your class");
					GivePlayerWeapon(playerid,27,450);
					GivePlayerWeapon(playerid,24,450);
					GivePlayerWeapon(playerid,31,500);
					GivePlayerWeapon(playerid,35,30);
					GivePlayerWeapon(playerid,29,600);
					gClass[playerid] = MEDIC;
				}
				else
				{
        			ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
				    return 0;
				}
			}
			if(listitem == 5)
			{
			    if(GetPlayerScore(playerid)>=1800)
			    {
			        ResetPlayerWeapons(playerid);
			        SendClientMessage(playerid,COLOR_PINK,"[INFO]:You Have selected bomber for your class!");
			        GivePlayerWeapon(playerid,27,450);
			        GivePlayerWeapon(playerid,35,10);
			        GivePlayerWeapon(playerid,24,450);
			        GivePlayerWeapon(playerid,16,10);
					SendClientMessage(playerid,COLOR_GREEN,"This class is able to plant bomb anywhere you want using /plantbomb. Usable 5 times per death.Also can use /abomb to plant bomb to nearest player");
					gClass[playerid] = DONOR;
			    }
			    else
			    {
			        SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:This class is required 1800 scores!");
        			ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
				    return 0;
			    }
			}
			if(listitem == 6)
			{
			    if(GetPlayerScore(playerid)>=1500)
			    {
			    	ResetPlayerWeapons(playerid);
			        SendClientMessage(playerid,COLOR_PINK,"[INFO]:You Have selected bomber for your class!");
			        GivePlayerWeapon(playerid,27,450);
			        GivePlayerWeapon(playerid,35,10);
			        GivePlayerWeapon(playerid,24,450);
			        GivePlayerWeapon(playerid,29,450);
			        GivePlayerWeapon(playerid,25,30);
			        gClass[playerid] = SUPPORTER;
				}
				else
				{
				    SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:This class is required 1500 scores!");
        			ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
				    return 0;
				}
			}
	    }
    	if(!response)
		{
			SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:You must choose your class!");
			ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
			return 0;
		}
How can i set a skin in every class? Because when i tried i had errors
But i want like if someone is in team Germany and chose sniper class will get a different skin from army sniper..
Reply
#2

Just add 'SetPlayerSkin(playerid, (ID));'

Under

if(listitem == 0)

and

if(listitem == 1)

If it still messes up, show us errors.
Reply
#3

Quote:
Originally Posted by Excelize
View Post
Just add 'SetPlayerSkin(playerid, (ID));'

Under

if(listitem == 0)

and

if(listitem == 1)

If it still messes up, show us errors.
Yeah, but i need different skin from each other like, arab sniper got skin id 178 and Russia sniper got skin id 190, how can i do that?
Reply
#4

Anyone got answer for this?

Quote:

Yeah, but i need different skin from each other like, arab sniper got skin id 178 and Russia sniper got skin id 190, how can i do that?

Reply
#5

Under list item 0
SetPlayerSkin(playerid, (178 ));

under list item 1

SetPlayerSkin(playerid, (190));
Reply
#6

Quote:
Originally Posted by Type-R
View Post
Under list item 0
SetPlayerSkin(playerid, (178 ));

under list item 1

SetPlayerSkin(playerid, (190));
The same problem,
Guys, am just looking like when someone choosing sniper class in the army team to have different skin from Russian sniper class skin..Hope you understand me.
Reply
#7

Here, Change the comments to your desired skins
pawn Code:
if(dialogid == DCLASS)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    ResetPlayerWeapons(playerid);
                    gClass[playerid] = ASSAULT;
                    GivePlayerWeapon(playerid,27,193);
                    GivePlayerWeapon(playerid,31,210);
                    GivePlayerWeapon(playerid,24,300);
                   
                    //SetPlayerSkin(playerid, ASSAULT_SKIN);
                    SendClientMessage(playerid,COLOR_PINK,"[INFO]:You have selected assault class for your class");
                }
                case 1:
                {
                    ResetPlayerWeapons(playerid);
                    gClass[playerid] = SNIPER;
                    GivePlayerWeapon(playerid,24,250);
                    GivePlayerWeapon(playerid,25,20);
                    GivePlayerWeapon(playerid,29,300);
                   
                    //SetPlayerSkin(playerid, SNIPER_SKIN);
                    SendClientMessage(playerid,COLOR_PINK,"[INFO]:You have selected Sniper class for your class");
                }
                case 2:
                {
                    if(GetPlayerScore(playerid) > 1500)
                    {
                        ResetPlayerWeapons(playerid);
                        SendClientMessage(playerid,COLOR_PINK,"[INFO]:You have selected Engineer for your class");
                        GivePlayerWeapon(playerid,27,450);
                        GivePlayerWeapon(playerid,24,450);
                        GivePlayerWeapon(playerid,31,500);
                        GivePlayerWeapon(playerid,35,10);
                        gClass[playerid] = ENGINEER;
                       
                        //SetPlayerSkin(playerid, ENGINEER_SKIN);
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:1500 Scores required for this class!");
                        ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
                    }
                }
                case 3:
                {
                    if(GetPlayerScore(playerid)>1200)
                    {
                        ResetPlayerWeapons(playerid);
                        SendClientMessage(playerid,COLOR_PINK,"[INFO]:You have selected Pilot for your class");
                        GivePlayerWeapon(playerid,16,10);
                        GivePlayerWeapon(playerid,27,300);
                        GivePlayerWeapon(playerid,24,350);
                        gClass[playerid] = PILOT;
                       
                        //SetPlayerSkin(playerid, PILOT_SKIN);
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:1200 Scores required for this class!");
                        ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
                    }
                }
                case 4:
                {
                    if(PlayerInfo[playerid][pVip]>0)
                    {
                        ResetPlayerWeapons(playerid);
                        SendClientMessage(playerid,COLOR_PINK,"[INFO]:You have selected Medic for your class");
                        GivePlayerWeapon(playerid,27,450);
                        GivePlayerWeapon(playerid,24,450);
                        GivePlayerWeapon(playerid,31,500);
                        GivePlayerWeapon(playerid,35,30);
                        GivePlayerWeapon(playerid,29,600);
                        gClass[playerid] = MEDIC;
                       
                        //SetPlayerSkin(playerid, MEDIC_SKIN);
                    }
                    else
                    {
                        ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
                        return 0;
                    }
                }
                case 5:
                {
                    if(GetPlayerScore(playerid)>=1800)
                    {
                        ResetPlayerWeapons(playerid);
                        SendClientMessage(playerid,COLOR_PINK,"[INFO]:You Have selected bomber for your class!");
                        GivePlayerWeapon(playerid,27,450);
                        GivePlayerWeapon(playerid,35,10);
                        GivePlayerWeapon(playerid,24,450);
                        GivePlayerWeapon(playerid,16,10);
                        SendClientMessage(playerid,COLOR_GREEN,"This class is able to plant bomb anywhere you want using /plantbomb. Usable 5 times per death.Also can use /abomb to plant bomb to nearest player");
                        gClass[playerid] = DONOR;
                       
                        //SetPlayerSkin(playerid, DONOR_SKIN);
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:This class is required 1800 scores!");
                        ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
                        return 0;
                    }
                }
                case 6:
                {
                    if(GetPlayerScore(playerid)>=1500)
                    {
                        ResetPlayerWeapons(playerid);
                        SendClientMessage(playerid,COLOR_PINK,"[INFO]:You Have selected bomber for your class!");
                        GivePlayerWeapon(playerid,27,450);
                        GivePlayerWeapon(playerid,35,10);
                        GivePlayerWeapon(playerid,24,450);
                        GivePlayerWeapon(playerid,29,450);
                        GivePlayerWeapon(playerid,25,30);
                        gClass[playerid] = SUPPORTER;
                       
                        //SetPlayerSkin(playerid, SUPPORTER_SKIN);
                    }
                    else
                    {
                        SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:This class is required 1500 scores!");
                        ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
                        return 0;
                    }
                }
            }
        }
        if(!response)
        {
            SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:You must choose your class!");
            ShowPlayerDialog(playerid,DCLASS,DIALOG_STYLE_LIST,"{0080AA}Select your class","Assault - Score 0\nSniper - Score 0\nEngineer - Score 1500\nPilot - Score 1200\nCaptain - Score 2500\nDonor - Only for donators\nBomber - Score 1800\nSupporter - Score 1500","Select","");
            return 0;
        }
    }
Reply
#8

Yeah okay, but i want every team to have different skins..
Reply
#9

Okay.. Put different skin for each team..
Reply
#10

Quote:
Originally Posted by xVIP3Rx
View Post
Okay.. Put different skin for each team..
Yeah, that what am asking, can you send me the codes for this>?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)