31.12.2013, 22:09
Hey guys, i have this code
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..
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; }
But i want like if someone is in team Germany and chose sniper class will get a different skin from army sniper..