Posts: 164
Threads: 12
Joined: Aug 2010
Reputation:
0
use
public OnGameModeInit()
{
Posts: 426
Threads: 46
Joined: Apr 2011
Posts: 286
Threads: 101
Joined: Apr 2011
Reputation:
0
That didn't help. I need the code for making an area, I dont need colour there or anything on the map, I just need that area so when you type for example /area, it will say "You are at the skatepark"
Posts: 1,679
Threads: 232
Joined: Nov 2009
Reputation:
0
GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy)
Posts: 1,046
Threads: 29
Joined: Mar 2010
pawn Код:
stock IsInSkatePark(playerid)
{
if(!IsPlayerConnected(playerid)) return false;
new Float:pPos[3];
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
if(pPos[0] >= 1862.7400 && pPos[0] <= 1976.1165 && pPos[1] >= -1449.9783 && pPos[1] <= -1351.8217) return true;
return false;
}
Then use it like this:
pawn Код:
//Somewhere in your code
if(IsInSkatePark(playerid)) SendClientMessage(playerid, 0xFF0000FF, "You are in Skate Park.");
Posts: 286
Threads: 101
Joined: Apr 2011
Reputation:
0
Would this work exactly in that area?
Posts: 1,046
Threads: 29
Joined: Mar 2010
Posts: 2,593
Threads: 34
Joined: Dec 2007
You can use
pawn Код:
stock IsInSkatePark(playerid)
{
new Float:pPos[3];
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
return (pPos[0] >= 1862.7400 && pPos[0] <= 1976.1165 && pPos[1] >= -1449.9783 && pPos[1] <= -1351.8217);
}