So, habe mal einen /spawn Befehl für dich erstellt.
Und /goto auch
/spawnplayer:
if(strcmp(cmd,"/spawnplayer",true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /spawnplayer [playerid]");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pSupporter] >= 1)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
SetPlayerSpawn(para1);
SendClientMessage(playerid, COLOR_GREEN, "Spieler erfolgreich gespawnt!");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Du darfst diesen Befehl nicht benutzen!!");
}
}
return 1;
}
/goto:
}
if(strcmp(cmd, "/goto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /goto [playerid/PartOfName]");
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 || PlayerInfo[playerid][pSupporter] >= 1)
{
if(Spectate[playerid] != 255)
{
Spectate[playerid] = 256;
}
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.");
GetPlayerName(plo, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s hat sich zu %s geportet.", sendername, giveplayer);
ABroadCast(0x00F5FFFF,string,4);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Du bist nicht befugt!");
}
}
}
else
{
format(string, sizeof(string), "%d ist kein Aktiver Spieler.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
Hoffentlich klappen die, wenn nicht melde dich einfach
(Gib mir doch bitte für diesen Beitrag einen Like)
MfG:
Juri