Need help with my robbank system
#1

Код:
new robbing[MAX_PLAYERS];
new alreadyrobbed[MAX_PLAYERS];

CMD:robbank(playerid, params [])
{
    if(IsPlayerConnected(playerid))
    {
        if(robbing[playerid] == 1)
        {
            SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+6);
            SendClientMessage(playerid, COLOR_GREY, " You are already robbing the bank + 6 level wanted, please slow down");
            return 1;
        }
        if(alreadyrobbed[playerid] == 1)
        {
            SendClientMessage(playerid, COLOR_WHITE, "You already robbed the bank! Wait 1 hour.");
            return 1;
        }
        if(!IsPlayerInRangeOfPoint(playerid, 15.0, 2471.9858,2355.4229,-52.0817))//Change those X,Y,Z
        {
            SendClientMessage(playerid, COLOR_GREY, " You are not at the bank !");
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "You have Robbed Los Santos Local Bank And Stole 1 Million Dollar - Stay low From Cops for few");
            robbing[playerid] = 1;
            GivePlayerMoney(playerid, 1000000);
            SendClientMessageToAll(COLOR_BLUE, "||----------------Latest News----------------||");
            SendClientMessageToAll(COLOR_GREEN, " Los Santos Local Bank Trust has Been Broken.");
            SendClientMessageToAll(COLOR_GREEN, " The Bank is Currentley getting Robbed. ");
            SendClientMessageToAll(COLOR_GREEN, " We will report more once we get more information");
            SendClientMessageToAll(COLOR_BLUE, "||----------------Latest News----------------||");
        }
    }
    return 1;
}
SendClientMessageToAll(COLOR_GREEN, " Los santos robbed the bank has failed.");
Код:
C:\Documents and Settings\user\My Documents\Untitled.pwn(6) : error 017: undefined symbol "MAX_PLAYERS"
C:\Documents and Settings\user\My Documents\Untitled.pwn(2) : error 017: undefined symbol "MAX_PLAYERS"
C:\Documents and Settings\user\My Documents\Untitled.pwn(4) : error 010: invalid function or declaration
C:\Documents and Settings\user\My Documents\Untitled.pwn(6) : warning 203: symbol is never used: "robbank"
C:\Documents and Settings\user\My Documents\Untitled.pwn(6 -- 40) : error 013: no entry point (no public functions)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
please help me with this stuff ... thanks
Reply
#2

Please someone help me with this script ...
Reply
#3

#include<a_samp> is it there? because max_players is defined in it.
Reply
#4

Quote:

#include <a_samp>

new robbing[MAX_PLAYERS];
new alreadyrobbed[MAX_PLAYERS];

CMD:robbank(playerid, params [])
{
if(IsPlayerConnected(playerid))
{
if(robbing[playerid] == 1)
{
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+6);
SendClientMessage(playerid, COLOR_RED, " You are already robbing the bank + 6 level wanted, please slow down");
return 1;
}
if(alreadyrobbed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You already robbed the bank! Wait 1 hour.");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 15.0, 2471.9858,2355.4229,-52.0817))//Change those X,Y,Z
{
SendClientMessage(playerid, COLOR_RED, " You are not at the bank !");
return 1;
}
if(robbingfailed[playerid] == 1)
{
SendClientMessageToAll(playerid, COLOR_RED, " Los santos robbed the bank has failed.");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You have Robbed Los Santos Local Bank And Stole 1 Million Dollar - Stay low From Cops for few");
robbing[playerid] = 1;
GivePlayerMoney(playerid, 1000000);
SendClientMessageToAll(COLOR_BLUE, "||----------------Latest News----------------||");
SendClientMessageToAll(COLOR_GREEN, " Los Santos Local Bank Trust has Been Broken.");
SendClientMessageToAll(COLOR_GREEN, " The Bank is Currentley getting Robbed. ");
SendClientMessageToAll(COLOR_GREEN, " We will report more once we get more information");
SendClientMessageToAll(COLOR_BLUE, "||----------------Latest News----------------||");
}
}
return 1;
}

Quote:

D:\Documents\Sin City Roleplay\filterscripts\robbank.pwn(6) : warning 203: symbol is never used: "robbank"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

warning .. when I log in and try the command it doesn't work ... Please can you fix this problem?
Reply
#5

#include <zcmd>
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)