Was ist Hier Falsch??
#include <a_samp>
#include <core>
#include <float>
static gTeam[MAX_PLAYERS];
new gPlayerClass[MAX_PLAYERS];
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define TEAM_TERRORIST
#define TEAM_COUNTER_TERRORIST
// Round duration
//new gRoundTime = 3600000; // 60 mins
//new gRoundTime = 900000; //15 mins
//new gRoundTime = 300000; // 5 mins
//------------------------------------------------------------------------------
main()
{
}
//------------------------------------------------------------------------------
public OnGameModeInit()
{
SetGameModeText("San Fierro TDM");
SetTeamCount(2);
SetWorldTime(12);
AddPlayerClass(285,2776.2981,-2379.0464,16.2244,88.4118,16,3,4,1,22,22); // CT
AddPlayerClass(258,2536.9382,-2535.7244,13.6250,268.8935,16,3,4,1,22,22); // T
return 1;
}
//------------------------------------------------------------------------------
public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"Counter Strike",2500,5);
GivePlayerMoney(playerid, 2000);
SetPlayerColor(playerid, COLOR_GREY);
return 1;
}
//------------------------------------------------------------------------------
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_TERRORIST)
{
SetPlayerColor(playerid,COLOR_RED); // Green
}
if(gTeam[playerid] == TEAM_COUNTER_TERRORIST)
{
SetPlayerColor(playerid,COLOR_GREEN); // Red
}
return 1;
}
//------------------------------------------------------------------------------
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == INVALID_PLAYER_ID) {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
} else {
if(gTeam[killerid] != gTeam[playerid]) {
// Valid kill
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid, 1000);
}
else {
//Team Killer!
new warning[256];
format(warning, sizeof(warning), "Du hast Teamkill Begangen, dir wurden 1000$ abgezogen.");
SendClientMessage(killerid, 0xFFFF00AA, warning);
SendDeathMessage(killerid,playerid,reason);
GivePlayerMoney(killerid, -1000);
SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
}
}
return 1;
}
//------------------------------------------------------------------------------
public SetupPlayerForClassSelection(playerid)
{
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerPos(playerid, 2715.2871,-2486.3831,29.1932);
SetPlayerCameraPos(playerid, 2715.2393,-2492.1199,29.1932);
SetPlayerCameraLookAt(playerid, 2715.2871,-2486.3831,29.1932);
}
//------------------------------------------------------------------------------
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerClass(playerid, classid);
SetupPlayerForClassSelection(playerid);
gPlayerClass[playerid] = classid;
switch (classid) {
case 0:
{
GameTextForPlayer(playerid, "~g~Worker", 500, 3);
}
case 1:
{
GameTextForPlayer(playerid, "~g~Pimp", 500, 3);
}
}
return 1;
}
//------------------------------------------------------------------------------
public GameModeExitFunc()
{
GameModeExit();
return 1;
}
//------------------------------------------------------------------------------
SetPlayerClass(playerid, classid) {
if(classid == 0)
{
gTeam[playerid] = TEAM_TERRORIST;
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_COUNTER_TERRORIST;
}
//------------------------------------------------------------------------------
Errors:
C:\Dokumente und Einstellungen\Danii\Desktop\sftdm.pwn(69) : error 029: invalid expression, assumed zero
C:\Dokumente und Einstellungen\Danii\Desktop\sftdm.pwn(73) : error 029: invalid expression, assumed zero
C:\Dokumente und Einstellungen\Danii\Desktop\sftdm.pwn(116) : warning 235: public function lacks forward declaration (symbol "SetupPlayerForClassSelection")
C:\Dokumente und Einstellungen\Danii\Desktop\sftdm.pwn(145) : warning 217: loose indentation
C:\Dokumente und Einstellungen\Danii\Desktop\sftdm.pwn(154) : warning 235: public function lacks forward declaration (symbol "GameModeExitFunc")
C:\Dokumente und Einstellungen\Danii\Desktop\sftdm.pwn(170) : error 029: invalid expression, assumed zero
C:\Dokumente und Einstellungen\Danii\Desktop\sftdm.pwn(174) : error 029: invalid expression, assumed zero
C:\Dokumente und Einstellungen\Danii\Desktop\sftdm.pwn(180) : error 030: compound statement not closed at the end of file (started at line 168)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Alles anzeigen