if(IsPlayerInRangeOfPoint(playerid,2.0,x,y,z))
{
SendClientMessage(playerid,-1,"You are in the pickup");
return 1;
}
|
If the player is going again and again near the pick up then it will show multiple times.
|
if(IsPlayerInRangeOfPoint(playerid, 2.0, X, Y, Z)) return SendClientMessage(playerid,-1, You are at the pickup!");
|
If the player is going again and again near the pick up then it will show multiple times.
|
|
Yes thats my problem.
And it doesnt work still showing me multiple times....Please help meeeeeee. |
#include <a_samp>
enum YOUR_PLAYER_ENUM
{
OnPickup
}
new Guy[MAX_PLAYERS][YOUR_PLAYER_ENUM];
forward YourFunctionName(playerid);
public YourFunctionName(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,2.0,0.0,0.0,0.0))
{
Guy[playerid][OnPickup]++;
if(Guy[playerid][OnPickup] == 1 && IsPlayerInRangeOfPoint(playerid,2.0,0.0,0.0,0.0))
{
SendClientMessage(playerid,-1,"You are on the pickup");
}
if(!IsPlayerInRangeOfPoint(playerid,2.0,0.0,0.0,0.0))Guy[playerid][OnPickup] = 0;
}
return 1;
}