12.01.2014, 16:10
Hello, so I am doing a pursuit system and it is based so that when the cop uses the command /chase when every 5 seconds a new marker will appear for police that will be followable by other police.
This is the command
The error
And the line the error is on
Also here is the public
and if it is needed the command to stop the pursuit
Thank you for any help!
This is the command
Код:
CMD:chase(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == LSPD) { new string[128]; new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); SetTimer(Pursuit(playerid), 5000, true); format(string, sizeof(string), "Dispatcher: All units be advised there is a pursuir on behave of %s!", sendername); SendFactionMessage(LSPD, COLOR_BLUE, string); } else { SendClientMessage(playerid, COLOR_RED, "You are not a LEO!"); } }
Код:
error 035: argument type mismatch (argument 1)
Код:
SetTimer(Pursuit(playerid), 5000, true);
Код:
public Pursuit(playerid) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerCheckpoint(x, y, z, 5); }
Код:
CMD:killchase(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == LSPD) { KillTimer(Pursuit(playerid)); } }