25.12.2014, 10:13
Hi,
We have a system of war GF (/ startwar) course when you / startwar game takes place in another world. (VirtualWorld). We have three different areas marked in red fication and I would like when you arrive in the area and then exit the area marked in red to show them a message: "A time 5,4,3,2,1 seconds you returned to area, otherwise you will lose HP "and after them all fall to 5 HP to enter the area.
What I tried:
When we tested is the first area I do not put me ... and I do not appears and the area is defined ...
We have a system of war GF (/ startwar) course when you / startwar game takes place in another world. (VirtualWorld). We have three different areas marked in red fication and I would like when you arrive in the area and then exit the area marked in red to show them a message: "A time 5,4,3,2,1 seconds you returned to area, otherwise you will lose HP "and after them all fall to 5 HP to enter the area.
What I tried:
Код:
public OnPlayerEnterDynamicArea(playerid, areaid)
{
if(areaid == warloc1)
{
SendClientMessage(playerid, COLOR_WHITE, "* Ai intrat in zona de war !");
KillTimer(WarzoneExit(playerid));
}
return 1;
}
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
if(areaid == warloc1)
{
SetTimer("WarzoneExit", 5000, true);
SendClientMessage(playerid, COLOR_WHITE, "* Ai timp 5 secunde pentru a te reintoarce in zona pentru a nu pierde HP !");
}
return 1;
}
forward WarzoneExit(playerid);
public WarzoneExit(playerid)
{
new Float:playerHealth = 0;
GetPlayerHealth ( playerid, playerHealth );
SetPlayerHealth(playerid, ( playerHealth -5.0 ) );
SendClientMessage(playerid, COLOR_WHITE, "* Ai pierdut -5 HP ! Intoarcete in zona de war !");
}



