NEED HELP!
#1

I have been searching for scripts that work like Wanted systems.
But when i try to compile it says:

Quote:

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.

Help?

The Pawn code is:
Код:
#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; }
thx for any help that comes.
Reply
#2

Why the hell do you want to include:
pawn Код:
#include gTeam[MAX_PLAYERS]

I think that should be:
pawn Код:
new gTeam[MAX_PLAYERS];
Reply
#3

Now this comes :

C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\ Stars.pwn(5) : error 017: undefined symbol "MAX_PLAYERS"
C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\ Stars.pwn(2) : error 009: invalid array size (negative, zero or out of bounds)
C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\ Stars.pwn(5) : warning 235: public function lacks forward declaration (symbol "OnPlayerDeath")
C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\ Stars.pwn(5) : error 017: undefined symbol "GetPlayerWantedLevel"
C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\ Stars.pwn(6) : error 004: function "SetPlayerWantedLevel" is not implemented
C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\ Stars.pwn(6) : warning 217: loose indentation
C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\ Stars.pwn(6) : error 004: function "SetPlayerWantedLevel" is not implemented
C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\ Stars.pwn(6) : error 004: function "SendClientMessage" is not implemented
C:\Dokumente und Einstellungen\Spiderman\Desktop\Vb6\filterscripts\ Stars.pwn(6) : fatal error 107: too many error messages on one line

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


7 Errors.
Reply
#4

#include <a_samp>

above everything

Then post the rest of the errors
Reply
#5

Код:
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; }

ANy body help?
Reply
#6

pawn Код:
#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;
}
Reply
#7

Quote:
Originally Posted by ♣ ⓐⓢⓢ
pawn Код:
#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;
}
oh awsome it works!!!
Tyvm!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)