if(strcmp(cmd, "/capture", true) == 0 || strcmp(cmd, "/claim", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pFMember] == 255)
{
SendClientMessage(playerid, COLOR_GREY, " You are not a member of a Family !");
return 1;
}
if(PlayerInfo[playerid][pRank] < 5)
{
SendClientMessage(playerid, COLOR_GREY, " You must be at least rank 5 to capture !");
return 1;
}
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " You can't capture while in a vehicle !");
return 1;
}
if(CapturingTimer[playerid]) return SendClientMessage(playerid,COLOR_GREY," You must wait 10 seconds before attempting to capture again !");
if(IsPlayerInRangeOfPoint(playerid,1.0,2629.4319,-2107.8040,16.9531)) //fossil fuel
{
if(PointInfo[0][PointTaken] != 255) { SendClientMessage(playerid, COLOR_GREY, " That isn't available to capture yet !"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, CapturePosition[playerid][pX], CapturePosition[playerid][pY], CapturePosition[playerid][pZ]);
format(string, sizeof(string), "%s is attempting to capture the materials factory 1 !", sendername,PointInfo[3][PointName]);
ProxDetector(50.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED) ;
PointCapturable = 3;
CapturingTimer[playerid] = true;
SetTimerEx("CapturingPoint",10*1000,0,"i",playerid );
}
else if(IsPlayerInRangeOfPoint(playerid,1.0,1423.6151,-1320.5437,13.5547)) //materials pickup 1
{
if(PointInfo[1][PointTaken] != 255) { SendClientMessage(playerid, COLOR_GREY, " That isn't available to capture yet !"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, CapturePosition[playerid][pX], CapturePosition[playerid][pY], CapturePosition[playerid][pZ]);
format(string, sizeof(string), "%s is attempting to capture the materials pickup 1 !", sendername,PointInfo[1][PointName]);
ProxDetector(50.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED) ;
PointCapturable = 1;
CapturingTimer[playerid] = true;
SetTimerEx("CapturingPoint",10*1000,0,"i",playerid );
}
/*else if(IsPlayerInRangeOfPoint(playerid,1.0,2205.9199,1 582.2222,999.9766)) //drug factory
{
if(PointInfo[2][PointTaken] != 255) { SendClientMessage(playerid, COLOR_GREY, " That isn't available to capture yet !"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, CapturePosition[playerid][pX], CapturePosition[playerid][pY], CapturePosition[playerid][pZ]);
format(string, sizeof(string), "%s is attempting to capture the drug factory !", sendername,PointInfo[2][PointName]);
ProxDetector(50.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED) ;
PointCapturable = 2;
CapturingTimer[playerid] = true;
SetTimerEx("CapturingPoint",10*1000,0,"i",playerid );
}
else if(IsPlayerInRangeOfPoint(playerid,1.0,2172.1880,-2263.9683,13.3363)) //materials factory 1
{
if(PointInfo[3][PointTaken] != 255) { SendClientMessage(playerid, COLOR_GREY, " That isn't available to capture yet !"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, CapturePosition[playerid][pX], CapturePosition[playerid][pY], CapturePosition[playerid][pZ]);
format(string, sizeof(string), "%s is attempting to capture the materials factory 1 !", sendername,PointInfo[3][PointName]);
ProxDetector(50.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED) ;
PointCapturable = 3;
CapturingTimer[playerid] = true;
SetTimerEx("CapturingPoint",10*1000,0,"i",playerid );
}
else if(IsPlayerInRangeOfPoint(playerid,1.0,2729.9077,-2451.4514,17.5937)) //auto export
{
if(PointInfo[4][PointTaken] != 255) { SendClientMessage(playerid, COLOR_GREY, " That isn't available to capture yet !"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, CapturePosition[playerid][pX], CapturePosition[playerid][pY], CapturePosition[playerid][pZ]);
format(string, sizeof(string), "%s is attempting to capture the auto export company !", sendername,PointInfo[4][PointName]);
ProxDetector(50.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED) ;
PointCapturable = 4;
CapturingTimer[playerid] = true;
SetTimerEx("CapturingPoint",10*1000,0,"i",playerid );
}
else if(IsPlayerInRangeOfPoint(playerid,1.0,323.0342,11 18.5804,1083.882) //drug house
{
if(PointInfo[5][PointTaken] != 255) { SendClientMessage(playerid, COLOR_GREY, " That isn't available to capture yet !"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, CapturePosition[playerid][pX], CapturePosition[playerid][pY], CapturePosition[playerid][pZ]);
format(string, sizeof(string), "%s is attempting to capture the drug house !", sendername,PointInfo[5][PointName]);
ProxDetector(50.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED) ;
PointCapturable = 5;
CapturingTimer[playerid] = true;
SetTimerEx("CapturingPoint",10*1000,0,"i",playerid );
} */
else if(IsPlayerInRangeOfPoint(playerid,1.0,2390.4053,-2008.2618,13.5537)) //materials pickup 2
{
if(PointInfo[2][PointTaken] != 255) { SendClientMessage(playerid, COLOR_GREY, " That isn't available to capture yet !"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, CapturePosition[playerid][pX], CapturePosition[playerid][pY], CapturePosition[playerid][pZ]);
format(string, sizeof(string), "%s is attempting to capture the materials pickup 2 !", sendername,PointInfo[6][PointName]);
ProxDetector(50.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED) ;
PointCapturable = 6;
CapturingTimer[playerid] = true;
SetTimerEx("CapturingPoint",10*1000,0,"i",playerid );
}
else if(IsPlayerInRangeOfPoint(playerid,1.0,2346.2937,-1185.2551,1027.9766)) //crack lab
{
if(PointInfo[3][PointTaken] != 255) { SendClientMessage(playerid, COLOR_GREY, " That isn't available to capture yet !"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, CapturePosition[playerid][pX], CapturePosition[playerid][pY], CapturePosition[playerid][pZ]);
format(string, sizeof(string), "%s is attempting to capture the crack lab !", sendername,PointInfo[3][PointName]);
ProxDetector(50.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED) ;
PointCapturable = 7;
CapturingTimer[playerid] = true;
SetTimerEx("CapturingPoint",10*1000,0,"i",playerid );
}
else if(IsPlayerInRangeOfPoint(playerid,1.0,2288.0730,-1105.4535,37.9766)) //materials factory 2
{
if(PointInfo[4][PointTaken] != 255) { SendClientMessage(playerid, COLOR_GREY, " That isn't available to capture yet !"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, CapturePosition[playerid][pX], CapturePosition[playerid][pY], CapturePosition[playerid][pZ]);
format(string, sizeof(string), "%s is attempting to capture the materials factory 2 !", sendername,PointInfo[4][PointName]);
ProxDetector(50.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED) ;
PointCapturable = 8;
CapturingTimer[playerid] = true;
SetTimerEx("CapturingPoint",10*1000,0,"i",playerid );
}
/*else if(IsPlayerInRangeOfPoint(playerid,1.0,1324.2122,2 86.5997,20.0452)) //sprunk factory MF1 MF2 MP1 MP2 and Crack Lab
{
if(PointInfo[9][PointTaken] != 255) { SendClientMessage(playerid, COLOR_GREY, " That isn't available to capture yet !"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, CapturePosition[playerid][pX], CapturePosition[playerid][pY], CapturePosition[playerid][pZ]);
format(string, sizeof(string), "%s is attempting to capture the sprunk factory !", sendername,PointInfo[9][PointName]);
ProxDetector(50.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED) ;
PointCapturable = 9;
CapturingTimer[playerid] = true;
SetTimerEx("CapturingPoint",10*1000,0,"i",playerid );
}*/
else
{
SendClientMessage(playerid, COLOR_GREY," You are not at the capture point !");
}
}
return 1;
}
|