Can use even if you haven't bought -
davve95 - 18.09.2013
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...
Re: Can use even if you haven't bought -
EiresJason - 18.09.2013
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;
}
Re: Can use even if you haven't bought -
davve95 - 18.09.2013
Quote:
Originally Posted by EiresJason
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
Re: Can use even if you haven't bought -
EiresJason - 18.09.2013
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.
Re: Can use even if you haven't bought -
davve95 - 18.09.2013
Quote:
Originally Posted by EiresJason
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.
Re: Can use even if you haven't bought -
EiresJason - 18.09.2013
No problem