Creating area
#1

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

use
public OnGameModeInit()
{
Reply
#3

Your saying GangZone EH?
Reply
#4

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"
Reply
#5

GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy)
Reply
#6

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

Would this work exactly in that area?
Reply
#8

yes...
Reply
#9

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


Forum Jump:


Users browsing this thread: 1 Guest(s)