30.10.2015, 16:54
Hi there ! My /goto command works only for id 0, so you can teleport only to the person with id 0 .
CMD:goto(playerid, params[]) { if(IsPlayerConnected(playerid)) { new toplayerid, Float:pos[3]; GetPlayerPos(toplayerid, pos[0], pos[1], pos[2]); if (toplayerid != INVALID_PLAYER_ID) { if(!sscanf(params, "i", toplayerid)) { SetPlayerPos(playerid, pos[0], pos[1], pos[2]); } else SendClientMessage(playerid, color_grey, "UTILIZARE:/goto <id>"); } } else SendClientMessage(playerid, color_grey, "Acest jucator nu este connectat"); return 1; }
CMD:goto(playerid, params[]) {
new toplayerid, Float:pos[3];
if(sscanf(params, "u", toplayerid)) return SendClientMessage(playerid, color_grey, "UTILIZARE:/goto <id>"); //You can do /goto <name or ID> now.
if(!IsPlayerConnected(toplayerid)) return SendClientMessage(playerid, color_grey, "Acest jucator nu este connectat");
GetPlayerPos(toplayerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
return 1;
}