15.11.2011, 18:44
Coloca no OnPlayer command text:
Fiz esse cmd do 0 se tiver algo errado me avisa ae
pawn Код:
if(strcmp(cmd, "/ir", true) == 0 || strcmp(cmd, "/goto", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /ir(goto) [playerid]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
GetPlayerPos(plo, plocx, plocy, plocz);
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Jogador nao conectado");
}
return 1;
}