20.12.2013, 11:10
Hello guys,
in my server, when points 're to capture, there 're no Point name write, i just see this words
CMD
in my server, when points 're to capture, there 're no Point name write, i just see this words
PHP код:
1 Has Become Available for capture
1 Has Become Available for capture
1 Has Become Available for capture
1 Has Become Available for capture
1 Has Become Available for capture
PHP код:
CMD:capture(playerid, params[])
{
new string[128];
new mypoint = -1;
if(GetPVarInt(playerid,"Injured") == 1)
{
SendClientMessageEx(playerid, COLOR_GRAD1, " You can not capture while injured!");
return 1;
}
if (PlayerInfo[playerid][pFMember] == 255 || PlayerInfo[playerid][pRank] < 5)
{
SendClientMessageEx(playerid, COLOR_GRAD1, " You are not high rank enough to capture!");
return 1;
}
for (new i=0; i<MAX_POINTS; i++)
{
if (IsPlayerInRangeOfPoint(playerid, 1.0, Points[i][Pointx], Points[i][Pointy], Points[i][Pointz])) mypoint = i;
}
if (mypoint == -1)
{
SendClientMessageEx(playerid, COLOR_GRAD1, " You are not at the capture place!");
return 1;
}
if (Points[mypoint][Vulnerable] > 0)
{
SendClientMessageEx(playerid, COLOR_GRAD1, " This point is not ready for takeover.");
return 1;
}
if (Points[mypoint][TimeToClaim])
{
SendClientMessageEx(playerid, COLOR_GRAD1, " This point is already being captured!");
return 1;
}
if(GetPlayerPing(playerid) > pointpinglimit)
{
format(string,sizeof(string), " You can not capture with %d+ ping!", pointpinglimit);
SendClientMessageEx(playerid, COLOR_WHITE, string);
return 1;
}
Points[mypoint][PointBarID] = CreateProgressBar(258.00, 137.00, 131.50, 3.19, COLOR_GREEN, 100.0);
SetProgressBarValue(Points[mypoint][PointBarID], 100.0);
ShowProgressBarForPlayer(playerid, Points[mypoint][PointBarID]);
format(string,sizeof(string), " %s is attempting to capture the point.", GetPlayerNameEx(playerid));
ProxDetector(70.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
GetPlayerPos(playerid, Points[mypoint][Capturex], Points[mypoint][Capturey], Points[mypoint][Capturez]);
Points[mypoint][ClaimerId] = playerid;
Points[mypoint][TimeToClaim] = 1;
Points[mypoint][TimeLeft] = 10;
SetTimerEx("ProgressTimer", 1000, 0, "d", mypoint);
return 1;
}
CMD:points(playerid, params[])
{
new string[128];
for(new i; i < MAX_POINTS; i++)
{
if (Points[i][Type] >= 0)
{
format(string, sizeof(string), "Name: %s | Owner: %s | Captured By: %s | Hours: %d",
Points[i][Name],Points[i][Owner],Points[i][CapperName],Points[i][Vulnerable]);
SendClientMessageEx(playerid, COLOR_WHITE, string);
}
}
return 1;
}