[Tutorial] How to make a robbery system
#21

Quote:
Originally Posted by TazmaNiax
View Post
yes i have its , but my money not increase after the robbery can you help ?
pawn Code:
GivePlayerMoney(i, mrand);
superrobot48 already said it before....
Reply
#22


doens't work for me
Reply
#23

Quote:
Originally Posted by TazmaNiax
View Post

doens't work for me
try this
pawn Code:
SetPlayerMoney(i, GetPlayerMoney(i) + mrand);
Reply
#24

Thanks a lot bro +Rep Nice tutorial
But i liked rarther using IsPlayerInDyanmicCP(playerid, CP_tatoo);
I used this
Reply
#25

Quote:
Originally Posted by rockhopper
View Post
Thanks a lot bro +Rep Nice tutorial
But i liked rarther using IsPlayerInDyanmicCP(playerid, CP_tatoo);
I used this
thanks for the suggestion!
will surely update this thankyou!!!!
Reply
#26

I have used this it works But the Problem Is Shop Robbed Recently Doesn't Work When I rob a shop during robbing I exit the cp And Robbery fails Then Just again I type /robshop it Starts Again Doesnt Show the message ShopRobbedRecenlty ? ? ? ?
Reply
#27

Hi Rockhopper, make sure u have this
pawn Code:
if(tatoorobbedrecently >=1) //checking if tatoo shop has been robbed recently
        {
            SendClientMessage(playerid, COLOR_RED, "Tatoo Shop has been robbed recently"); // sending error message
        }
in ur /robstore command
Reply
#28

Quote:
Originally Posted by rockhopper
View Post
I have used this it works But the Problem Is Shop Robbed Recently Doesn't Work When I rob a shop during robbing I exit the cp And Robbery fails Then Just again I type /robshop it Starts Again Doesnt Show the message ShopRobbedRecenlty ? ? ? ?
use
pawn Code:
if(tatoorobbedrecently >=1) //checking if tatoo shop has been robbed recently
        {
            SendClientMessage(playerid, COLOR_RED, "Tatoo Shop has been robbed recently"); // sending error message
            return 1;
        }
Reply
#29

Quote:
Originally Posted by ThatThoseTheThy
View Post
Code:
C:\Users\Owner\Downloads\Server (1) (1)\Server (1)\The_Server\gamemodes\Rob_System.pwn(59) : error 021: symbol already defined: "SetTimer"
C:\Users\Owner\Downloads\Server (1) (1)\Server (1)\The_Server\gamemodes\Rob_System.pwn(83) : error 017: undefined symbol "GivePlayerScore"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
how do i fix this?
For GivePlayerScore, use this.

Code:
GetPlayerScore(SetPlayerScore(i,1));
Reply
#30

It seems nice

Btw is it kinda mission or anything similar, or just robbing?
Reply
#31

the problem is you can only rob one time if you try to rob it again it wont be rob i waited 4 hours to re rob it but it told Tatoo Shop has been robbed recently" how can we fix it please help ??
Reply
#32

You could have added timer in rob command of 60 seconds, instead of this "public ServerRobbery() ".
Anyway not bad.
Reply
#33

You've forgot about setting the Robbed recently to 0, Lemme do it for you. You can also set up this thing in 1 timer instead of timer for every different robbery. But this way is more easy.


Code:
CMD:robthis(playerid, params[])
{
    #pragma unused params // we dont need the params
    if(IsPlayerInDynamicCP(playerid, CP_tatoo)) // Checking if player is in the checkpoint
	{
	    if(tatoorobbedrecently >=1) //checking if tatoo shop has been robbed recently
	    {
	        SendClientMessage(playerid, COLOR_RED, "Tatoo Shop has been robbed recently"); // sending error message
                return 1;
		}
                 SetTimer("robbedrecently", 180000, false);//Set a timer of 180 seconds to set the recentlyrobbed to 0
		ROBBING_TATOO[playerid] = 60; // setting the robbery timer
		tatoorobbedrecently =180; // Time the players needs to wait for starting an another robbery in the same place
	}

public robbedrecently()
{
    tatoorobbedrecently = 0;//Sets it to zero
}
	return 1;
}
Reply
#34

Seems like the robbery timer wont reset when i rob first time can rob but second i want rob cannot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)