31.08.2011, 21:52
hi , i have this ;
so , i want whene a player choose the skin 285 and spawn with it , Give him Weapons...
but it doesn't give him anything or saying the Message In Game , BTW i have defined the TEAM:
Note: the First Addclass(balabla) is the Skin 285 so , it must work .. Need Help
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(playerid);
if(gTeam[playerid] == TEAM_STARS)
{
SetPlayerPos(playerid, -379.6754,911.4002,9.4913);
SetPlayerSkin(playerid, 285);
gTeam[playerid] = TEAM_STARS;
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 31, 300);
GivePlayerWeapon(playerid, 34, 100);
SetPlayerColor(playerid,0x00FF00AA);
GameTextForPlayer(playerid,"Welcome to S.T.A.R HQ sir !",1,1);
}
return 1;
}
but it doesn't give him anything or saying the Message In Game , BTW i have defined the TEAM:
pawn Код:
public SetPlayerTeamFromClass(playerid,classid)
{
// Set their team number based on the class they selected.
if(classid == 0) {
gTeam[playerid] = TEAM_STARS;
}
}