15.06.2009, 12:10
Could you help me doing a spawn system like: you spawn near other players and each others...
Originally Posted by Hygs
Any1 ?
|
Originally Posted by Roban[swe
]
And i think this is impossible... Its possible but only if you spawn 1 feet from a player... Else you can spawn under the ground and in buildings or in the air! But think about it this relly sux... If i drive a air plane 10000 feet in the air and you spawn near me... you just died... |
IsPlayerNearPlayer(Float:radi, playerid, targetid) { if(IsPlayerConnected(playerid) && IsPlayerConnected(targetid)) { new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); GetPlayerPos(targetid, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } } return 0; }