17.04.2011, 18:47
Guys I know how to set pickups in game but I don't know how to make a command that works only when player is on the pickup, I want the command to teleport player in other place, can someone tell me how to make that
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/cmd", cmdtext, true, 4) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, X, Y. Z)) //Pickup coords
{
SetPlayerPos(playerid, x, y, z);
}
return 1;
}
return 0;
}