Help with Gangzone messages -
XrespenserX - 02.09.2012
Sup ppl, I have a random nooby question, I hope I'll get a good reply real soon.
So my problem is, I've set up one gangzone.
Now I want the following stuff:
It's a dogfight type of gamemode, and I want the hydras can only shoot when they're in that zone, therefor:
-Hydras can only attack in that zone
-When a hydra enters the area, he should get a message saying that "you're now in the combat area! clear to engage!"
-When he leaves the gangzone, he should get this message "You're out of the combat zone, do not engage"
And if he fires any missiles or something without being in the combat zone, he'll get killed instantly.
I really really appreciate if someone could help me out!
Thanks in advance!
Re: Help with Gangzone messages -
mamorunl - 02.09.2012
OnKeyStateChange (or something):
Check if the player presses the FIRE key and if he is in a HYDRA. Then check if he is in the combat zone:
if he is > Let him do whatever he wants
if he isnt > KILL THE FKER!
Now create a timer that checks every X seconds and check the area:
Код:
If IsPlayerInArea(gangzone)
if variable == TRUE
Send Message
variable = false
else (not in gangzone)
if variable == FALSE
Send Message
variable = true
AW: Re: Help with Gangzone messages -
XrespenserX - 02.09.2012
Quote:
Originally Posted by mamorunl
OnKeyStateChange (or something):
Check if the player presses the FIRE key and if he is in a HYDRA. Then check if he is in the combat zone:
if he is > Let him do whatever he wants
if he isnt > KILL THE FKER!
Now create a timer that checks every X seconds and check the area:
Код:
If IsPlayerInArea(gangzone)
if variable == TRUE
Send Message
variable = false
else (not in gangzone)
if variable == FALSE
Send Message
variable = true
|
Any chance to get that in a code so I can get it as an example? Sorry I'm not really experienced in PAWN..
Re: Help with Gangzone messages -
Nirzor - 02.09.2012
new missle;
yeah OnKeyState
if (PlayerInRangeOfPoint(cords here))
{
missle = true
SendClientMessage(playerid, COLOR_RED,"You are now in the combat zone!");
}
else
{
missle = false
if (Vehicleid = bla bla) something code like this is there
and there is a code i forgot to get if player is shooting with vehicle add that then
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_RED,"You have left the zone and engaged and missile so your killed");
}
please +Rep if i helped you!
AW: Re: Help with Gangzone messages -
XrespenserX - 02.09.2012
Quote:
Originally Posted by Nirzor
new missle;
yeah OnKeyState
if (PlayerInRangeOfPoint(cords here))
{
missle = true
SendClientMessage(playerid, COLOR_RED,"You are now in the combat zone!");
}
else
{
missle = false
if (Vehicleid = bla bla) something code like this is there
and there is a code i forgot to get if player is shooting with vehicle add that then
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_RED,"You have left the zone and engaged and missile so your killed");
}
please +Rep if i helped you!
|
Thanks.