Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Synx on May 01, 2011, 07:55:04 pm
-
I want make world bounds over army base to nobody can't leave.
I tryed from this http://famp.ru/wiki/SetWorldBounds still not understand.
[pawn]SetWorldBounds(1780.2505,1588.6793,-304.5052,-86.6157);[/pawn]
Help please.
P.S. Sorry for bad English.
-
I want make world bounds over army base to nobody can't leave.
I tryed from this http://famp.ru/wiki/SetWorldBounds still not understand.
[pawn]SetWorldBounds(1780.2505,1588.6793,-304.5052,-86.6157);[/pawn]
Help please.
P.S. Sorry for bad English.
SetWorldBounds is bugged. You'll need to script a function that puts a player back in the army base when they try to leave.
-
I use Shadow Heekz One
Add These Two in Public's
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
return 0;
}
and
public MapBounds()
{
for(new i = 0; i <= MAX_PLAYERS; i++) if(IsPlayerConnected(i) == 1) {
if(!PlayerToPoint(50,i,1780.2505,1588.6793,-304.5052,-86.6157)){
if(PlayerInfo[i][Spawned] == 1) {
SetPlayerPos(i,1780.2505,1588.6793,-304.5052,-86.6157,1.00,0);
}
}
}
At GameModeInit
SetTimer("MapBounds",15s00,0);
-
noooo!!! is not buged i used that i can give u the coordinates just from the military base???? ok i'll give u that one
just remplace the old one for that one
[pawn]SetWorldBounds(-1590.893,-1778.929,-90.53571,-306.4286);[/pawn]
it's working i already tried it