How to Define a city - 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: How to Define a city (
/showthread.php?tid=438820)
How to Define a city -
Gabriel1337 - 22.05.2013
How to Define a City in Pawno?
For Example I have
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
I wanted to do Like
If(playerid,getplayerpos , Los Santos == true)
SetPlayerPos (playerid,(Nearest Hospital)
How to define a city?
Re: How to Define a city -
Abhishek. - 22.05.2013
getplayer2darea in azones script check it out
Re: How to Define a city -
Gabriel1337 - 22.05.2013
Quote:
Originally Posted by Abhishek.
getplayer2darea in azones script check it out
|
Do I need to include something for it?
Re: How to Define a city -
Guest123 - 22.05.2013
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInRangeOfPoint(playerid, 300.0 ,259.3984,-1229.6013,73.7732))//los santos
{
SetPlayerPos(playerid,1218.9458,-1811.7068,16.5938);// los santos hospital - i think you can change it lol
GameTextForPlayer(playerid,"Spawned At Los Santos Hospitals",6000,5);
}
return 1;
}
or you can make like this
put this on header your script
pawn Код:
#define Los_Santos 259.3984,-1229.6013,73.7732
#define Nearest_Hospital 1218.9458,-1811.7068,16.5938
then
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInRangeOfPoint(playerid, 300.0 ,Los_Santos))//los santos
{
SetPlayerPos(playerid,Nearest_Hospital);// los santos hospital - i think you can change it lol
}
return 1;
}