28.07.2014, 16:15
Hi, I have a small find player script but im wondering how i could make it so that it will trace the player continuously instead of just a marker that will be placed.
Код:
CMD:find(playerid,params[]) { new id,str[128]; new pname[MAX_PLAYER_NAME+1]; if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /find [playerid]"); if(Finding[id] == 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"You Are not finding that player"); if(Finding[id] == 1) return SendClientMessage(playerid,COLOR_LIGHTRED,"Player Already being found"); if(playerid == id) return SendClientMessage(playerid,COLOR_LIGHTRED,"You Cannot Find your self."); if(IsACop(playerid) && PlayerInfo[playerid][pSwat] >= 1) { GetPlayerName(id,pname,sizeof(pname)); format(str,sizeof(str),"You are now finding %s - they are marked on your map!",id); SendClientMessage(playerid, COLOR_WHITE,str); SetPlayerMarkerForPlayer(playerid,id,0xFF0000FF); Finding[id] = 1; } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You are not a cop or swat member !."); } return 1; } CMD:cfind(playerid,params[]) // Cancels the marker { new id,str[128]; new pname[MAX_PLAYER_NAME+1]; if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /canclefindplayer [playerid]"); if(Finding[id] == 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Player Not being found"); GetPlayerName(id,pname,sizeof(pname)); format(str,sizeof(str),"You have stopped finding %s - they have been removed from your map!",id); SendClientMessage(playerid, COLOR_WHITE,str); SetPlayerMarkerForPlayer(playerid,id,0xFFFFFF00); Finding[id] = 0; return 1; }