CMD:backup(playerid,params[]) { if(pInfo[playerid][LSPD] >= 1) { new string[126],Float:x, Float:y, Float:z; format(string,sizeof(string),"[Dispatch]: %s is requesting backup at %s!",RemoveUnderScore(playerid),GetPlayerArea(playerid)); SendCopMessage(COLOR_BLUE,string); GetPlayerPos(playerid,x,y,z); SetPlayerCheckpoint(playerid,x,y,z,5.0); } }
Well that's what I made but I am looking forward to update the checkpoint, I mean when the player moves the checkpoint will update at his position, how to do that?
Код:
SetPlayerCheckpoint(playerid,x,y,z,5.0); |
CMD:backup(playerid,params[]) { //enter all the code you already have right here //the below example is if you want to give every cop your checkpoint without /respond for(new i = 0; i < MAX_PLAYERS; i++) { if(IsCop[i]) //of course, this isn't the right variable, but you can enter that for yourself as this is just an example to help out { SetPlayerCheckpoint(i,...) //fill in the parameters accordingly } } }
Well that's what I made but I am looking forward to update the checkpoint, I mean when the player moves the checkpoint will update at his position, how to do that?
Код:
CMD:backup(playerid,params[]) { if(pInfo[playerid][LSPD] >= 1) { new string[126],Float:x, Float:y, Float:z; format(string,sizeof(string),"[Dispatch]: %s is requesting backup at %s!",RemoveUnderScore(playerid),GetPlayerArea(playerid)); SendCopMessage(COLOR_BLUE,string); GetPlayerPos(playerid,x,y,z); SetPlayerCheckpoint(playerid,x,y,z,5.0); } } |
new Float:slx, Float:sly, Float:slz; GetPlayerPos(giveplayerid, slx, sly, slz); SetPlayerMarkerForPlayer(playerid, giveplayerid, 0xFF0000AA); // 0xFF0000AA - whatever color you want - it will be keep tracking your target if he moves or changing positions.