12.10.2011, 22:40
Hey currently creating some of my anti cheat but i get really annoying warnings:
i mean i know the wont affect anything but i like to have my gamemodes perfectly compiled so could anyone help please?
pawn Код:
new pMoney[MAX_PLAYERS];
new ForbiddenWeapons[][] = {
38, //Minigun
35, //RPG
36 //Heatseeking RPG
};
pawn Код:
public OnPlayerUpdate(playerid)
{
new pName[MAX_PLAYER_NAME], string[128];
if(GetPlayerMoney(playerid) > pMoney[playerid])
{
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "[SERVER]: %s has been banned, Reason: Money Hack", pName);
SendClientMessageToAll(COLOR_RED, string);
BanEx(playerid, "Money Hack");
}
new w = 0;
while(w < (sizeof(ForbiddenWeapons))){
if(GetPlayerWeapon(playerid) == w){
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "[SERVER]: %s has been banned, Reason: Weapon Hack", pName);
SendClientMessageToAll(COLOR_RED, string);
BanEx(playerid, "Weapon Hacks");
}
return 1;
}
}
Код:
C:\Users\Admin\Desktop\SAMP\Fas FreeRoam\gamemodes\diftV1.pwn(98) : warning 209: function "OnPlayerUpdate" should return a value C:\Users\Admin\Desktop\SAMP\Fas FreeRoam\gamemodes\diftV1.pwn(1306) : warning 203: symbol is never used: "ForbiddenWeapons" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.