müsste gehen
if(strcmp(cmd, "/goto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /goto [Playerid/Name]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if(IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
GetPlayerPos(plo, plocx, plocy, plocz);
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));
SendClientMessage(playerid, COLOR_GRAD1, " Du hast dich Teleportiert");
format(string, 256, "Admin: %s hat sich zu einem Spieler Teleportiert!",sendername);
ABroadCast(COLOR_RED,string,1);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "* Du bist kein Administrator!");
}
}
}
else
{
format(string, sizeof(string), " %d ist kein aktiver Spieler.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}