29.04.2010, 07:12
comando /procurar, Cria Checkpoint na localizaзгo de um outro player:
pawn Code:
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd,"/procurar",true) == 0)
{
new tmp[256];
new giveplayerid;
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid,COR_BRANCO,"USO: /procurar [id]");
if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COR_BRANCO, "id invalido.");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(giveplayerid, X,Y,Z);
SetPlayerCheckpoint(playerid, X,Y,Z, 6);
return 1;
}