20.05.2012, 18:46
(
Последний раз редактировалось BigGroter; 20.05.2012 в 19:37.
Причина: typo
)
I'm following this tutorial.
https://sampwiki.blast.hk/wiki/PAWN_tutorial_1
I'm near the bottom, and it says;
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = TEAM_GROVE;
}
else
{
gTeam[playerid] = TEAM_BALLA;
}
}
Where do I add it? It says;
Place that code OUTSIDE a function in your code (as it is a new function) and put these lines as the first things after the open curly braces in your OnPlayerRequestClass callback (notice the way the variables are not global so we are having to pass them to out function too)
I can't get it to work though, help is appreciated.
https://sampwiki.blast.hk/wiki/PAWN_tutorial_1
I'm near the bottom, and it says;
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = TEAM_GROVE;
}
else
{
gTeam[playerid] = TEAM_BALLA;
}
}
Where do I add it? It says;
Place that code OUTSIDE a function in your code (as it is a new function) and put these lines as the first things after the open curly braces in your OnPlayerRequestClass callback (notice the way the variables are not global so we are having to pass them to out function too)
I can't get it to work though, help is appreciated.