24-7 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 24-7 (
/showthread.php?tid=100346)
24-7 -
Hot - 04.10.2009
Is there a way to check if player is at 24-7?
Like IsPlayerAt247 or something...
Re: 24-7 -
Redirect Left - 04.10.2009
Yes, you'll need to get the co-ords of the insides of all 24/7s, and use PlayerToPoint, or IsPlayerInSquare, or similiar.
Re: 24-7 -
Hot - 04.10.2009
Is there an website or something to found it?
Re: 24-7 -
MadeMan - 04.10.2009
PlayerToPoint function
pawn Код:
PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
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;
}
Re: 24-7 -
ferriswheel - 04.10.2009
I do believe the Godfather script has a function similar to that for its "/buy" command. Maybe you could "borrow" some coordinates from that
Re: 24-7 -
Hot - 04.10.2009
Okay but there ar elots of 24/7 spread out the whole san andreas and at god father script only have one coord . :/
Код:
if (!PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53))//centerpoint 24-7
Re: 24-7 -
ferriswheel - 04.10.2009
I do believe that all the 24-7's are located near each other in the "interior world" of GTA:SA. But don't take my word for it. Best bet is to test it in game, with something as simple as:
pawn Код:
if (strcmp("/test", cmdtext, true) == 0)
{
if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53))
{
SendClientMessage(playerid, COLOR, "You are in a 24-7!");
}
else
{
SendClientMessage(playerd, COLOR, "You are not in a 24-7!");
}
return 1;
}
Re: 24-7 -
Hot - 04.10.2009
Okay but, i was looking at san fierro and, I could not found a 24/7 there. does them exists there?