12.03.2010, 17:41
Once I add this command to my gamemode I get unlimited "PlayerToPoint" errors o ra lot of lines
Any ideas what it can be?When I remeve the command it complies like charm.Thanks in advance
Under my variables
Under OnPlayerCommandText
Код:
...\gamemodes\breakdownls.pwn(line) : error 004: function "PlayerToPoint" is not implemented
Under my variables
pawn Код:
new DragTimer[MAX_PLAYERS];
pawn Код:
if (strcmp(cmd, "/drag", true) == 0)
{
if(gTeam[playerid] == 2 || IsACop(playerid))
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /drag [playerid]");
return 1;
}
if(!IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid,COLOR_GREY, string);
return 1;
}
if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 3)
{
SendClientMessage(playerid, 0xFF0000AA, "You are too far away from that player.");
return 1;
}
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_RED, "You cannot drag yourself!");
return 1;
}
if(DragTimer[playerid] <= 0)
{
if(IsPlayerConnected(giveplayerid) == 1)
{
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "Officer %s started dragging %s", playername, sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
DragTimer[playerid] = SetTimerEx("Drag", 1000, 1, "ii", playerid, giveplayerid);
TogglePlayerControllable(giveplayerid, 0);
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not a Cop or an FBI Agent!!");
}
return 1;
}
if (strcmp(cmd, "/stopdrag", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /stopdrag [playerid]");
return 1;
}
if(gTeam[playerid] == 2 || IsACop(playerid))
{
if(DragTimer[playerid] >= 0)
{
if(PlayerCuffed[giveplayerid] == 1)
{
TogglePlayerControllable(giveplayerid, 0);
}
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "Officer %s stopped dragging %s", playername, sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
KillTimer(DragTimer[playerid]);
DragTimer[playerid] = 0;
TogglePlayerControllable(giveplayerid, 1);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not a Cop or an FBI Agent !");
}
return 1;