OnPlayerSpawn Messages
#1

Hello there,

I have some errors on this public. Ignore the SetPlayerToTeamColor, that is fine, its those clientmessages :S I would be grateful if anyone could help

CODE:

Код:
public OnPlayerSpawn(playerid)
{
  SetPlayerToTeamColor(playerid);
  
	if (gTeam[playerid] == TEAM_TAXI);
	SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Taksуwkarz! Życzymy miłej gry.");
	
	else if (gTeam[playerid] == TEAM_POLICE);
	SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Policjant! Życzymy miłej gry.");
	SendClientMessage(playerid,COLOR_YELLOW, "Dostałes bronie, nie nadużywaj ich! Admin zastosuje konsekwencje wobec ciebie jeżeli je nadużyjesz!");
	
	else if (gTeam[playerid] == TEAM_POMOC);
	SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Pomoc Drogowa! Życzymy miłej gry.");
	SendClientMessage(playerid,COLOR_YELLOW, "Możesz zaczepić pojazd Towtruckiem używając CTRL lub ALT.");

  else if (gTeam[playerid] == TEAM_MEDYK);
	SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Pogotowie / Lekarz! Życzymy miłej gry.");
	SendClientMessage(playerid,COLOR_YELLOW, "Możesz leczyć graczy, używając komendy /heal.");
	
  else if (gTeam[playerid] == TEAM_STRAZAK);
	SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Straż Pożarna! Życzymy miłej gry.");
	
  else if (gTeam[playerid] == TEAM_PILOT);
	SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Pilot! Życzymy miłej gry.");
	SendClientMessage(playerid,COLOR_YELLOW, "Dostępne komendy: /fly - Radio pilotуw.");
	
  else if (gTeam[playerid] == TEAM_PILOT);
	SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Kierowca Autobusu! Życzymy miłej gry.");
	SendClientMessage(playerid,COLOR_YELLOW, "Dostępne komendy: /dworzec-lv - Dworzec Autobusowy w LV.");
	
  else if (gTeam[playerid] == TEAM_TRUCKER);
	SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Kierowca Ciężarуwki (Trucker)! Życzymy miłej gry.");
	SendClientMessage(playerid,COLOR_YELLOW, "Dostępne komendy: /cb - CB Radio ~ /baza [1-3] - bazy truckerskie.");

  else if (gTeam[playerid] == TEAM_ATC);
	SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Kontroler Ruchu Lotniczego! Życzymy miłej gry.");
	SendClientMessage(playerid,COLOR_YELLOW, "Wieża na ktуrej się zespanowałes to San Andreas Center. Możesz operować całym ruchem lotniczym w SA i po za nim.");
	
  else if (gTeam[playerid] == TEAM_AIRPORT);
	SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Obsługa Lotniskowa! Życzymy miłej gry.");
	SendClientMessage(playerid,COLOR_YELLOW, "Możesz obsługiwać lotniska i samoloty, przywozić schody, wozić bagaże oraz tankować samoloty itp.");
	
  else if (gTeam[playerid] == TEAM_SAILORS);
	SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Marynarz! Życzymy miłej gry.");
	SendClientMessage(playerid,COLOR_YELLOW, "Możesz pływać i żeglować łуdkami po szerokich morzach w San Andreas.");
  return 1;
}
ERRORS:
Код:
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\trans.pwn(2056) : error 036: empty statement
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\trans.pwn(2059) : error 029: invalid expression, assumed zero
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\trans.pwn(2059) : warning 215: expression has no effect
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\trans.pwn(2059) : error 001: expected token: ";", but found "if"
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\trans.pwn(2059) : error 036: empty statement
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\trans.pwn(2059) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Line 2056:
Код:
	if (gTeam[playerid] == TEAM_TAXI);
Line 2059:
Код:
else if (gTeam[playerid] == TEAM_POLICE);
Thanks and Regards
Puzi
Reply
#2

Delete the ; after if (gTeam[playerid] == TEAM_TAXI);
and the other if's
Reply
#3

Thanks a lot
Reply
#4

Actually, it works, but it works when you spawn as any class, and all the text appears.
So its not like separated for each class if you know what I mean, its just all the long text and does not matter with with class you spawn as.

Any suggestions?
Reply
#5

pawn Код:
if (gTeam[playerid] == TEAM_TAXI)
{
    SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Taksуwkarz! Życzymy miłej gry.");
}
else if (gTeam[playerid] == TEAM_POLICE)
{
    SendClientMessage(playerid,COLOR_YELLOW, "Zespanowałes się jako Policjant! Życzymy miłej gry.");
    SendClientMessage(playerid,COLOR_YELLOW, "Dostałes bronie, nie nadużywaj ich! Admin zastosuje konsekwencje wobec ciebie jeżeli je nadużyjesz!");
}
etc
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)