SA-MP Forums Archive
Is It Possible? - 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)
+--- Thread: Is It Possible? (/showthread.php?tid=589940)



Is It Possible? - Devon007 - 24.09.2015

If A Player Die In LV City He Will Spawn In LV City

How To Check City?


AW: Is It Possible? - Kaliber - 24.09.2015

PHP код:
stock GetPlayerCity(playerid)
{
    new 
Float:X,Float:Y,Float:Z;
    
GetPlayerPos(playerid,X,Y,Z);
    if (
<= 1700.8179 && >= 2903.0476 && <= -2860.2761 && >= -701.8962) return 1;
    if (
<= -2885.0598 && >= -1405.0571 && <= -1021.6824 && >= 1436.9240) return 2;
    if (
<= 130.7416 && >= 1447.1925 && <= -2843.7100 && >= -799.4094) return 3;
    return 
0;
}
//Usage:
new city GetPlayerCity(playerid);
// if city == 1 then its LS, 2 = SF, 3 = LV, 0 = other place 



Re: Is It Possible? - Devon007 - 24.09.2015

Thanks Kaliber