How to Define a city
#1

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?
Reply
#2

getplayer2darea in azones script check it out
Reply
#3

Quote:
Originally Posted by Abhishek.
Посмотреть сообщение
getplayer2darea in azones script check it out
Do I need to include something for it?
Reply
#4

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)