Posts: 443
Threads: 21
Joined: Jul 2013
I want to add blow bank system, when you be at the right coordinates or near them, you explode but i dont know how, what function should I use or could you post me a fixed code.
Here is my function:
Код:
public ExplodeC4(playerid)
{
new Float:x, Float:y, Float:z;
GetObjectPos(C4T, x, y, z);
DestroyObject(C4T);
CreateExplosion(x, y, z, 7, 10.0);
C4T= 0;
return 1;
}
Thanks in advance.
Posts: 487
Threads: 35
Joined: Oct 2013
Reputation:
0
I think he means to get the right function to use it in the system.
@Sojo You mean a function that allows you to detect the object's coordinates or position and when you blow it, it explodes the specified place like the bank when you are in the right cords or near them.
Am I right?
Posts: 443
Threads: 21
Joined: Jul 2013
Posts: 443
Threads: 21
Joined: Jul 2013
Im sorry guys, nothing worked for me
I think you didn't understand me well.
What I meant is, when you blow a C4 near a bank vault, the bank vault blows and it sends a message to everyone. The problem is I didn't know what function to use to detect if is the C4 in the vault position to blow it.
If the C4 isn't near the position then don't blow the bank vault.
'IsPlayerInRangeOfPoint' didn't work. I don't want to detect if is the player near the C4 in order to blow it.
I want to detect if the C4 in the cords or near them or/and in the range in order to explode it and explode the bank vault. Even if he's away of the C4 and he detonates it and it's near the bank vault, the bank vault gets blown.
Maybe you will understand me well here:
What I'm trying to do is blow bank vault system. And to do that, I need the right function but didn't find it.
-I hope you understand.
(I really need this, please help me using this code)
Posts: 443
Threads: 21
Joined: Jul 2013
Posts: 225
Threads: 3
Joined: Mar 2013
Reputation:
0
Why you don't check C4 in the cords or near bank vault when you plant C4 ?
Posts: 443
Threads: 21
Joined: Jul 2013
Because I don't have the right function, what function I'll use in your opinion? I think GetObjectPos is not useful because it only depends on the specified position, not less or more. I mean I can't stand on the right position, it's really hard.
GetPlayerPos doesn't include range, near or anything? Is that correct?
It only requires the specified position only, not less or more? Right?