08.09.2011, 18:10
i need help i want to create gangs with pawno
On Top of Script:
new gTeam[MAX_PLAYERS];
#define TEAM_WORKERS 1
#define TEAM_AGENTS 2
#define SetPlayerTeamFromClass
public OnPlayerRequestClass(playerid, classid)
SetPlayerTeamFromClass(playerid, classid);//Add this line to the end!
{
if(classid == 0)
{
gTeam[playerid] = TEAM_WORKERS;
SetPlayerTeam(playerid,TEAM_WORKERS);//You can delete this line if you want to allow team killing...
GameTextForPlayer(playerid,"~g~Workers",10,0);
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_AGENTS;
SetPlayerTeam(playerid,TEAM_AGENTS);//Same for this!
GameTextForPlayer(playerid,"~r~Agents",10,0);
}
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPlayerTeam(playerid) == TEAM_AGENTS)
{
SetPlayerPos(playerid,-2136.3921,-124.4632,36.5191);//Chnage this to the spawnpoint of your Agents Team!
SetPlayerHealth(playerid,100);
}
else if(GetPlayerTeam(playerid) == TEAM_WORKERS)
{
SetPlayerHealth(playerid,100);
SetPlayerPos(playerid,-2016.3192,130.2446,27.6875);//Chnage this to the spawnpoint of your Workers Team!
}
}
return 1;
}
Now i become these 2 errors -.- : C:\Users\Josh\Desktop\gta server\gamemodes\RPG.pwn(84) : warning 215: expression has no effect
C:\Users\Josh\Desktop\gta server\gamemodes\RPG.pwn(127) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Can someone HELP me? please? i cant find my mistake -.- dont send me http://wiki.sa-mp.co...N_for_Begginers!
i know how to script but its hard for me to script a team so please help lol
On Top of Script:
new gTeam[MAX_PLAYERS];
#define TEAM_WORKERS 1
#define TEAM_AGENTS 2
#define SetPlayerTeamFromClass
public OnPlayerRequestClass(playerid, classid)
SetPlayerTeamFromClass(playerid, classid);//Add this line to the end!
{
if(classid == 0)
{
gTeam[playerid] = TEAM_WORKERS;
SetPlayerTeam(playerid,TEAM_WORKERS);//You can delete this line if you want to allow team killing...
GameTextForPlayer(playerid,"~g~Workers",10,0);
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_AGENTS;
SetPlayerTeam(playerid,TEAM_AGENTS);//Same for this!
GameTextForPlayer(playerid,"~r~Agents",10,0);
}
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPlayerTeam(playerid) == TEAM_AGENTS)
{
SetPlayerPos(playerid,-2136.3921,-124.4632,36.5191);//Chnage this to the spawnpoint of your Agents Team!
SetPlayerHealth(playerid,100);
}
else if(GetPlayerTeam(playerid) == TEAM_WORKERS)
{
SetPlayerHealth(playerid,100);
SetPlayerPos(playerid,-2016.3192,130.2446,27.6875);//Chnage this to the spawnpoint of your Workers Team!
}
}
return 1;
}
Now i become these 2 errors -.- : C:\Users\Josh\Desktop\gta server\gamemodes\RPG.pwn(84) : warning 215: expression has no effect
C:\Users\Josh\Desktop\gta server\gamemodes\RPG.pwn(127) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Can someone HELP me? please? i cant find my mistake -.- dont send me http://wiki.sa-mp.co...N_for_Begginers!
i know how to script but its hard for me to script a team so please help lol