Can use even if you haven't bought
#1

Hi!


I'm a little bit stuck with my script, I'm making a bomb system...

But I haven't got a solution for: When you buy a bomb
I use: BombUse[playerid]=1;

What's that named.. I don't remember..

But when you should use the command, you can use it even if you haven't bought the bomb..


Because I can't make it just with (prevent):

Because it has to allow to use it if you have actually bought a bomb.

BombUse[playerid]=1;
BombUse[playerid]=0;

Well I don't know more about that function if there are any more callback or
what it's named, for it..

So are the any more function for this ^...

If you get what I mean...
Reply
#2

Does your /makebomb command have this?
pawn Code:
CMD:makebomb(playerid, params[])
{
   if(BombUse[playerid] == 1)
   {    
      BombUse[playerid] = 0;
      //code to make bomb go off.

   }
   else SendClientMessage(playerid, COLOR_HERE, "ERROR: You need a bomb to use this   command!");
 
   return 1;
}
Reply
#3

Quote:
Originally Posted by EiresJason
View Post
Does your /makebomb command have this?
pawn Code:
CMD:makebomb(playerid, params[])
{
   if(BombUse[playerid] == 1)
   {    
      BombUse[playerid] = 0;
      //code to make bomb go off.

   }
   else SendClientMessage(playerid, COLOR_HERE, "ERROR: You need a bomb to use this   command!");
 
   return 1;
}
I think I found out now is it:

if(BombUse[playerid] == 1)

?,Because I don't have it.

I'll try it, thanks alot
Reply
#4

Yeh; put that under the makebomb command and it should fix your error.

If it doesn't work; post the command for making a bomb and buying a bomb and I'll help you.
Reply
#5

Quote:
Originally Posted by EiresJason
View Post
Yeh; put that under the makebomb command and it should fix your error.

If it doesn't work; post the command for making a bomb and buying a bomb and I'll help you.
It worked , thanks again.
Reply
#6

No problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)