13.09.2008, 12:27
code:
now i want to do, in timer the checkpoint move on the player.
how its need to be?
i do:
but its do checkpoint on me!
what i need to do?
Код:
if(strcmp(cmd, "/findman", true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /findman [playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Find yourself!"); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); new Float:X,Float:Y,Float:Z; GetPlayerPos(giveplayerid, X,Y,Z); SetPlayerCheckpoint(playerid, X,Y,Z, 0); SetTimer("makav", 1000, 1); } } else { SendClientMessage(playerid, COLOR_GREY, " Invalid Name/ID !"); } return 1; }
how its need to be?
i do:
Код:
public makav(giveplayerid, playerid) { for(new i = 0; i < MAX_PLAYERS; i++) { new Folat:x, Folat:y, Folat:z; GetPlayerPos(giveplayerid, x, y, z); SetPlayerCheckpoint(playerid, x,y,z, 0); return 1; } }
what i need to do?