Help me to fix a problem..
#1

hi , i have this ;

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;
}
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:

pawn Код:
public SetPlayerTeamFromClass(playerid,classid)
{
    // Set their team number based on the class they selected.
    if(classid == 0) {
        gTeam[playerid] = TEAM_STARS;
    }
}
Note: the First Addclass(balabla) is the Skin 285 so , it must work .. Need Help
Reply
#2

Any Idea Guys , any Idea..
Reply
#3

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    // Set their team number based on the class they selected.
    if(classid == 0)
    {
        gTeam[playerid] = TEAM_STARS;
    }
return 1;
}


Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 23 seconds.

Reply
#4

show me your OnPlayerRequestClass
Reply
#5

Jack is right, You could also use:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
     SetPlayerTeamFromClass(playerid,classid);
     return 1;
}
Reply
#6

Working Jack thanx all !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)