[pawn]new bool:gotoplayer[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
gotoplayer[playerid] = true;
return 1;
}
CMD:goto(playerid,params[])
{
new gotozas;
new Float:x, Float:y, Float:z;
if(sscanf(params, \"u\", gotozas)) SendClientMessage(playerid, COLOR_AQUA, \"Használlat: /goto [iD]\" );
else if(gotozas == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_AQUA, \"Hiba: Nincs Ilyen ID-jû Játékos A Szerveren!\" );
else if(gotoplayer[gotozas] != true)return SendClientMessage(playerid,0xFF0000FF,\"A játékos letiltotta a gotozást!\");
else
{
GetPlayerPos(gotozas,x,y,z);
SetPlayerPos(playerid, x, y+2, z+2);
}
return 1;
}
CMD:gotobe(playerid,params[])
{
if(gotoplayer[playerid] != true)
{
gotoplayer[playerid] = true;
SendClientMessage(playerid,0xFFFFFFFF,\"Goto engedélyezve\");
}
else SendClientMessage(playerid,0xFF0000FF,\"A goto már engedélyezve van!\");
return 1;
}
CMD:gotoki(playerid,params[])
{
if(gotoplayer[playerid] != false)
{
gotoplayer[playerid] = false;
SendClientMessage(playerid,0xFFFFFFFF,\"Goto letiltva\");
}
else SendClientMessage(playerid,0xFF0000FF,\"A goto már tiltva van!\");
return 1;
}[/pawn]