New Bad Problem -
New Ilyass - 23.01.2011
Код:
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_GROVE) { SetPlayerColor(playerid,COLOR_GREEN); SetPlayerInterior(playerid,3); }
else if(gTeam[playerid] == TEAM_BALLAS) SetPlayerColor(playerid,COLOR_PURPLE);
else if(gTeam[playerid] == TEAM_AZTECAS) SetPlayerColor(playerid,COLOR_LIGHTBLUE);
else if(gTeam[playerid] == TEAM_VAGOS) SetPlayerColor(playerid,COLOR_YELLOW);
else if(gTeam[playerid] == TEAM_COPS) SetPlayerColor(playerid,COLOR_BLUE);
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(99) : error 017: undefined symbol "gTeam"
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(99) : warning 215: expression has no effect
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(99) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(99) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(99) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: New Bad Problem -
Kase - 23.01.2011
At the top of your script:
Instead of your code:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_GROVE) { SetPlayerColor(playerid,COLOR_GREEN); SetPlayerInterior(playerid,3); }
if(gTeam[playerid] == TEAM_BALLAS) SetPlayerColor(playerid,COLOR_PURPLE);
if(gTeam[playerid] == TEAM_AZTECAS) SetPlayerColor(playerid,COLOR_LIGHTBLUE);
if(gTeam[playerid] == TEAM_VAGOS) SetPlayerColor(playerid,COLOR_YELLOW);
if(gTeam[playerid] == TEAM_COPS) SetPlayerColor(playerid,COLOR_BLUE);
}
This should work. Also, you should be able to use a switch-case structure.
Re: New Bad Problem -
California - 23.01.2011
Add this to the top of your script:
static gTeam[MAX_PLAYERS];
and finally (this time we are going to switch through each team (using gTeam) and use the team's integers (might not be the right ones)):
pawn Код:
public OnPlayerSpawn(playerid)
{
switch(gTeam[playerid]) {
case 1: {
SetPlayerColor(playerid,COLOR_GREEN);
SetPlayerInterior(playerid,3);
}
case 2 {
SetPlayerColor(playerid,COLOR_PURPLE);
}
case 3 {
SetPlayerColor(playerid,COLOR_LIGHTBLUE);
}
case 4 {
SetPlayerColor(playerid,COLOR_YELLOW);
}
case 5 {
SetPlayerColor(playerid,COLOR_BLUE);
}
}
// other shit, etc...
return 1;
}
Re: New Bad Problem -
New Ilyass - 23.01.2011
Isn't work allways
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(5) : error 055: start of function body without function header
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(81) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(81) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(87) : error 017: undefined symbol "gTeam"
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(87) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(87) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Sanaв\Bureau\samp03csvr_win32\gamemodes\l sgw.pwn(87) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Re: New Bad Problem -
New Ilyass - 23.01.2011
#include <a_samp>
#include <core>
#include <float>
static gTeam[MAX_PLAYERS];
#define COLOR_GREEN 0x33AA33AA //grove
#define COLOR_PURPLE 0x800080AA //ballas
#define COLOR_LIGHTBLUE 0x33CCFFAA //aztecas
#define COLOR_YELLOW 0xFFFF00AA //vagos
#define COLOR_BLUE 0x0000BBAA // cops
Re: New Bad Problem -
Kase - 23.01.2011
Could you release those lines and the code around it?
Re: New Bad Problem -
New Ilyass - 23.01.2011
i don't understand