28.06.2011, 16:05
Try this code:
REMARK: The problem is that you are making a GM and at the top of script there was #if defined FILTERSCRIPT, althought you didn't define this before.
PHP код:
#include <a_samp>
#define TEAM_GROVE 1
#define TEAM_BALLA 2
#define TEAM_GROVE_COLOR 0x00FF00AA // Bright Green
#define TEAM_BALLA_COLOR 0xFF00FFAA // Bright Purple
new gTeam[MAX_PLAYERS];
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnGameModeInit()
{
SetGameModeText("Test Server");
AddPlayerClass(107,2521.5156,-1678.9836,15.4372,92.7751, 5, 0, 22, 100, 32, 50);
AddPlayerClass(102,2001.1736,-1122.1942,26.6893,179.8825, 5, 0, 22, 100, 32, 50);
return 1;
}
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0) { gTeam[playerid] = TEAM_GROVE; }
else { gTeam[playerid] = TEAM_BALLA; }
}
SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_GROVE) { SetPlayerColor(playerid, TEAM_GROVE_COLOR); }
else if (gTeam[playerid] == TEAM_BALLA) { SetPlayerColor(playerid, TEAM_BALLA_COLOR); }
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SetPlayerToTeamColor(playerid);
return 1;
}