29.07.2015, 22:38
How can i save player class id? im using mysql btw.
PHP код:
public SetPlayerTeamFromClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid,classid);
gPlayerClass[playerid] = classid;
{
if (classid == 0 || classid == 1 || classid == 2 || classid == 3 || classid == 4 || classid == 5 || classid == 6 || classid == 7 || classid == 8 || classid == 9 || classid == 10 || classid == 11)
{
gTeam[playerid] = COPS;
GameTextForPlayer(playerid, "~b~POLICE OFFICER", 600, 5);
return 1;
}
else if (classid == 12 )
{
gTeam[playerid] = ARMY;
GameTextForPlayer(playerid, "~b~~h~ARMY", 500, 5);
return 1;
}
else if (classid == 13)
{
gTeam[playerid] = FBI;
GameTextForPlayer(playerid, "~b~FBI", 500, 5);
return 1;
}
else if (classid == 14 || classid == 15 || classid == 16)
{
gTeam[playerid] = CIA;
GameTextForPlayer(playerid, "~w~CIA", 500, 5);
return 1;
}
else if (classid == 17 || classid == 18 || classid == 19 || classid == 20)
{
gTeam[playerid] = MEDICS;
GameTextForPlayer(playerid, "~p~~h~MEDIC", 500, 5);
return 1;
}
else if (classid >= 21)
{
gTeam[playerid] = CIVILIANS;
GameTextForPlayer(playerid, "~w~CIVILIAN", 500, 5);
return 1;
}
return 1;
}
}