Something about a derby...
#1

I was making a derby today and then i was wondering if a player falls off the derby and on to the water. How do i make him suicide?

Im not sure if the function isplayerinarea would work
Reply
#2

pawn Код:
new Float:x, Float:y, Float:z;
for(new i = 0; i < MAX_PLAYERS; i++)
{
  GetPlayerPos(i, x, y, z);
  if(z < {COORD}) // change '{COORD}' to your Z co-ord of when they are in the water or just above the water
  {
    SetPlayerHealth(i, 0.0);
  }
}
Could do something like that in a timer?
Reply
#3

Quote:
Originally Posted by ((Lorenc))
I was making a derby today and then i was wondering if a player falls off the derby and on to the water. How do i make him suicide?

Im not sure if the function isplayerinarea would work
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(z = < -2)
{
SetPlayerHealth(playerid, 0.0);
}
Reply
#4

Quote:
Originally Posted by Geo_
pawn Код:
new Float:x, Float:y, Float:z;
for(new i = 0; i < MAX_PLAYERS; i++)
{
  GetPlayerPos(i, x, y, z);
  if(z < {COORD}) // change '{COORD}' to your Z co-ord of when they are in the water or just above the water
  {
    SetPlayerHealth(i, 0.0);
  }
}
Could do something like that in a timer?
dude i was posting D:
Reply
#5

ok cool ill check after
Reply
#6

Quote:
Originally Posted by Geo_
pawn Код:
new Float:x, Float:y, Float:z;
for(new i = 0; i < MAX_PLAYERS; i++)
{
  GetPlayerPos(i, x, y, z);
  if(z < {COORD}) // change '{COORD}' to your Z co-ord of when they are in the water or just above the water
  {
    SetPlayerHealth(i, 0.0);
  }
}
Could do something like that in a timer?
your code worked but

Quote:
Originally Posted by IamNotKoolllll
Quote:
Originally Posted by ((Lorenc))
I was making a derby today and then i was wondering if a player falls off the derby and on to the water. How do i make him suicide?

Im not sure if the function isplayerinarea would work
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(z = < -2)
{
SetPlayerHealth(playerid, 0.0);
}
your one didnt ...

and btw thanks for replying!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)