04.01.2014, 20:24
Hello guys,
So i have IsPlayerInRangeOfPoint and yes, its working completely fine exept i have changed the Virtual world that players are in when this is used and it no longer works.
If the player is in world 0 it works however if in any other world it does not.
Here is my code..
If anybody could tell me a solution it would be great..
P.S The world the player is in is Virtual World 3. Thanks
So i have IsPlayerInRangeOfPoint and yes, its working completely fine exept i have changed the Virtual world that players are in when this is used and it no longer works.
If the player is in world 0 it works however if in any other world it does not.
Here is my code..
Код:
public OnPlayerUpdate(playerid) { if(IsPlayerInRangeOfPoint(playerid, 12.0, 997.0865,-7995.4355,44.1828)) { if(IsPlayerInRangeOfPoint(playerid, 12.0, 248.5794,3768.5403,24.7804)) { if(PlayerWinner[playerid] == 0) { new mystring[200], name[200]; GetPlayerName(playerid, name, 24); format(mystring, 128, "{FF0000}(%s (%d)){00FFFC} Has Completed Skydive Challenge!(/sdc) And Earned 50 Score! ", name, playerid); SendClientMessageToAll(-1, mystring); SetPlayerScore(playerid, GetPlayerScore(playerid) + 50); PlayerWinner[playerid] = 1; SetPlayerPos(playerid, 413.7531,2454.8821,16.4844); SetPlayerVirtualWorld(playerid, 0); } }
P.S The world the player is in is Virtual World 3. Thanks