SA-MP Forums Archive
Creating area - 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: Creating area (/showthread.php?tid=307359)



Creating area - HondaCBR - 30.12.2011

I want to create area in the skatepark, so if you in there and type a command something will happen, but ignore that for now, all I need now is to create the area, so could someone show me how to do that and where to use each cord?
pawn Код:
RED: 1862.8195,-1449.9850,13.4849
PINK:1862.7400,-1351.7928,13.4849
YELLOW:1976.1002,-1351.8217,23.8854
BLUE: 1976.1165,-1449.9783,13.4918



Re: Creating area - fangoth1 - 30.12.2011

use
public OnGameModeInit()
{


Re: Creating area - Aira - 30.12.2011

Your saying GangZone EH?


Re: Creating area - HondaCBR - 30.12.2011

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"


Re: Creating area - vassilis - 30.12.2011

GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy)


AW: Creating area - BigETI - 30.12.2011

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.");



Re: Creating area - HondaCBR - 30.12.2011

Would this work exactly in that area?


AW: Creating area - BigETI - 30.12.2011

yes...


Re: Creating area - Jefff - 30.12.2011

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