C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\ Stars.pwn(2) : fatal error 100: cannot read from file: "gTeam[MAX_PLAYERS]" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
#define TEAM_COP 21 #include gTeam[MAX_PLAYERS] #define COLOR_BRIGHTRED 0xFF0000AA #define COLOR_COP 0x3C26C7AA public OnPlayerDeath(playerid, killerid, reason) { new oldlevel; new newlevel; oldlevel = GetPlayerWantedLevel(killerid); newlevel = oldlevel + 1; if(gTeam[killerid] != TEAM_COP) SetPlayerWantedLevel(killerid, newlevel); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_BRIGHTRED,"Your wanted level is increased!"); } else if(GetPlayerWantedLevel(playerid) == 1) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,1000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 1000$!");} } else if(GetPlayerWantedLevel(playerid) == 2) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,2000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 2000$!");} } else if(GetPlayerWantedLevel(killerid) == 3) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,3000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 3000$!");} } else if(GetPlayerWantedLevel(killerid) == 4) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,4000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 4000$!");} } else if(GetPlayerWantedLevel(killerid) == 5) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,5000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 5000$!");} } else if(GetPlayerWantedLevel(killerid) == 6) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,6000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 6000$!");} } return 1; }
#include gTeam[MAX_PLAYERS]
new gTeam[MAX_PLAYERS];
Ok now Following Errors: C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\Stars.pwn(7) : warning 217: loose indentation C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\Stars.pwn(7) : error 010: invalid function or declaration C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\Stars.pwn(14) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. whit following: [PAWN Code]#include <a_samp> new gTeam[MAX_PLAYERS]; #define TEAM_COP 21 #define COLOR_BRIGHTRED 0xFF0000AA #define COLOR_COP 0x3C26C7AA public OnPlayerDeath(playerid, killerid, reason) { new oldlevel; new newlevel; oldlevel = GetPlayerWantedLevel(killerid); newlevel = oldlevel + 1; if(gTeam[killerid] != TEAM_COP) SetPlayerWantedLevel(killerid, newlevel); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_BRIGHTRED,"Your wanted level is increased!"); } else if(GetPlayerWantedLevel(playerid) == 1) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,1000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 1000$!");} } else if(GetPlayerWantedLevel(playerid) == 2) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,2000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 2000$!");} } else if(GetPlayerWantedLevel(killerid) == 3) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,3000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 3000$!");} } else if(GetPlayerWantedLevel(killerid) == 4) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,4000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 4000$!");} } else if(GetPlayerWantedLevel(killerid) == 5) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,5000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 5000$!");} } else if(GetPlayerWantedLevel(killerid) == 6) { if(gTeam[killerid] == TEAM_COP){ GivePlayerMoney(killerid,6000); SetPlayerWantedLevel(playerid, 0); SendClientMessage(killerid, COLOR_COP,"You killed a criminal and earned 6000$!");} } return 1; }
#include <a_samp>
new gTeam[MAX_PLAYERS];
#define TEAM_COP 21
#define COLOR_COP 0x3C26C7AA
#define COLOR_BRIGHTRED 0xFF0000AA
public OnPlayerDeath(playerid, killerid, reason)
{
if(gTeam[killerid] == TEAM_COP)
{
new string[40];
string[0] = GetPlayerWantedLevel(playerid) * 1000;
GivePlayerMoney(killerid, string[0]);
SetPlayerWantedLevel(playerid, 0);
format(string, sizeof string, "You killed a criminal and earned %d$!", string[0]);
SendClientMessage(killerid, COLOR_COP, string);
}
else
{
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
SendClientMessage(killerid, COLOR_BRIGHTRED, "Your wanted level is increased!");
}
return 1;
}
Originally Posted by ♣ ⓐⓢⓢ
pawn Код:
|