new pWanted[MAX_PLAYERS];
stock SetPlayerWanted(playerid, level) //MAX WANTED CHANGE TO 2500 STARS :V
{
if (level > 2500) level = 2500;
if (level < 0) level = 0;
pWanted[playerid] = level;
SetPlayerWantedLevel(playerid, pWanted[playerid]);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
//------------[PLAYER SUICIDE]----------------
if(killerid == INVALID_PLAYER_ID)
{
return SetPlayerWanted(playerid, 0);
}
//----------[PLAYER KILL PLAYER]------------
SetPlayerWanted(playerid, 0);
SetPlayerWanted(killerid, pWanted[playerid] + 1);
ResetPlayerWeapons(playerid);
return 1;
}
CMD:wanted(playerid, params[])
{
if(IsACop(playerid) || PlayerInfo[playerid][pJob] == 2 || PlayerInfo[playerid][pJob2] == 2)
{
new string[128], x;
SendClientMessageEx(playerid, COLOR_GREEN, "Current Wanted Suspects:");
foreach(new i: Player)
{
if(PlayerInfo[i][pWantedLevel] >= 1)
{
format(string, sizeof(string), "%s%s: %d", string,GetPlayerNameEx(i),PlayerInfo[i][pWantedLevel]);
x++;
if(x > 3) {
SendClientMessageEx(playerid, COLOR_YELLOW, string);
x = 0;
format(string, sizeof(string), " ");
} else {
format(string, sizeof(string), "%s, ", string);
}
}
}
if(x <= 3 && x > 0)
{
string[strlen(string)-2] = '.';
SendClientMessageEx(playerid, COLOR_YELLOW, string);
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, " You're not a lawyer or a law enforcement officer!");
}
return 1;
}
./includes/variables.pwn(7) : error 010: invalid function or declaration ./includes/callbacks.pwn(4238) : error 028: invalid subscript (not an array or too many subscripts): "pWantedLevel" ./includes/callbacks.pwn(4238) : warning 215: expression has no effect ./includes/callbacks.pwn(4238) : error 001: expected token: ";", but found "]" ./includes/callbacks.pwn(4238) : error 029: invalid expression, assumed zero ./includes/callbacks.pwn(4238) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
//------------[PLAYER SUICIDE]---------------- if(killerid == INVALID_PLAYER_ID) { return SetPlayerWanted(playerid, 0); } //----------[PLAYER KILL PLAYER]------------ SetPlayerWanted(playerid, 0); SetPlayerWanted(killerid, pWantedLevel[playerid] + 1); ResetPlayerWeapons(playerid);
Код HTML:
./includes/variables.pwn(7) : error 010: invalid function or declaration ./includes/callbacks.pwn(4238) : error 028: invalid subscript (not an array or too many subscripts): "pWantedLevel" ./includes/callbacks.pwn(4238) : warning 215: expression has no effect ./includes/callbacks.pwn(4238) : error 001: expected token: ";", but found "]" ./includes/callbacks.pwn(4238) : error 029: invalid expression, assumed zero ./includes/callbacks.pwn(4238) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors. Код HTML:
//------------[PLAYER SUICIDE]---------------- if(killerid == INVALID_PLAYER_ID) { return SetPlayerWanted(playerid, 0); } //----------[PLAYER KILL PLAYER]------------ SetPlayerWanted(playerid, 0); SetPlayerWanted(killerid, pWantedLevel[playerid] + 1); ResetPlayerWeapons(playerid); |
stock SetPlayerWanted(playerid, level) //MAX WANTED CHANGE TO 2500 STARS :V
{
if (level > 2500) level = 2500;
if (level < 0) level = 0;
PlayerInfo[playerid][pWantedLevel] = level;
SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
//------------[PLAYER SUICIDE]----------------
if(killerid == INVALID_PLAYER_ID)
{
return SetPlayerWanted(playerid, 0);
}
//----------[PLAYER KILL PLAYER]------------
SetPlayerWanted(playerid, 0);
SetPlayerWanted(killerid, PlayerInfo[playerid][pWantedLevel] + 1);
ResetPlayerWeapons(playerid);
return 1;
}