Simple Scripting Question
#9

Try this code:

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.775150221003250);
    
AddPlayerClass(102,2001.1736,-1122.1942,26.6893,179.882550221003250);
    return 
1;    
}
SetPlayerTeamFromClass(playeridclassid)
{
    if (
classid == 0) { gTeam[playerid] = TEAM_GROVE; }
    else { 
gTeam[playerid] = TEAM_BALLA; }
}
SetPlayerToTeamColor(playerid)
{
    if (
gTeam[playerid] == TEAM_GROVE) { SetPlayerColor(playeridTEAM_GROVE_COLOR); }
    else if (
gTeam[playerid] == TEAM_BALLA) { SetPlayerColor(playeridTEAM_BALLA_COLOR); }
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746);
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    
SetPlayerToTeamColor(playerid);
    return 
1;

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.
Reply


Messages In This Thread
Simple Scripting Question - by Mr.Black - 28.06.2011, 15:31
Re: Simple Scripting Question - by swieberdevos - 28.06.2011, 15:33
Re: Simple Scripting Question - by Mr.Black - 28.06.2011, 15:36
Re: Simple Scripting Question - by Mr.Black - 28.06.2011, 15:50
Re: Simple Scripting Question - by GangsTa_ - 28.06.2011, 15:55
Re: Simple Scripting Question - by Mr.Black - 28.06.2011, 15:59
Re: Simple Scripting Question - by GangsTa_ - 28.06.2011, 16:01
Re: Simple Scripting Question - by Mr.Black - 28.06.2011, 16:05
Re: Simple Scripting Question - by Shadoww5 - 28.06.2011, 16:05
Re: Simple Scripting Question - by Mr.Black - 28.06.2011, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)