need some help..
#1

i have this bit of code :

Код:
public FallingChecker()
{
   new Float:x,Float:y,Float:z,Float:d;
   for(new i =0; i<MAX_PLAYERS; i++)
   {
     if(IsPlayerConnected(i))
	 {
	    GetPlayerPos(i,x,y,z);
	    d = floatsqroot((x-LastX[i] * x-LastX[i]) + (y-LastY[i] * y-LastY[i]));
	    if(d < 10 && (LastZ[i] - z) > 5)
	    {
	      OnPlayerFall(i);
	    }
	    LastX[i] = x;
	    LastY[i] = y;
	    LastZ[i] = z;
	 }
   }
   return 1;
}

public OnPlayerFall(playerid)
{
	SendClientMessage(playerid,0x000000FF,"You are falling! A parachute has been equipped.");
	SendClientMessage(playerid,0x000000FF,"Open your parachute NOW!!!");
	GivePlayerWeapon(playerid,46,1);
	return 1;
}
the problem is: i dont get a parachute whilst im in air and the messages dont appear at all.. so please if you could help me , and explain allitle more on how to exactly do this
Reply


Messages In This Thread
need some help.. - by Virtual1ty - 06.07.2009, 19:24
Re: need some help.. - by yom - 06.07.2009, 19:48
Re: need some help.. - by Virtual1ty - 06.07.2009, 20:34
Re: need some help.. - by yom - 06.07.2009, 20:38
Re: need some help.. - by Virtual1ty - 06.07.2009, 20:43
Re: need some help.. - by Virtual1ty - 07.07.2009, 09:53

Forum Jump:


Users browsing this thread: 1 Guest(s)