Hallo Brotfischer,
seiht langem hatte ich keinen Wunsch mehr da ich viel dazu gelernt habe im Scripting Nunja aber kein Mensch ist perfekt
Also mein wunsch währe das wenn ein Spieler /gotooff macht keiner sich mit /goto zu ihm porten kann auser man macht /gotoon
Der Befehl:
if(strcmp(cmd, "/goto", true) == 0) // Teleports to a player
{
new Float:pX,Float:pY,Float:pZ;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, ORANGE, "USAGE: /goto [playername/id]");
return 1;
}
if(!AccountInfo[playerid][AdminLevel] >= 2 && (noad))
{
SendClientMessage(playerid, COLOR_GRAD2, "Goto wurde von den Admins deaktiviert! !");
return 1;
}
if(DMZone[playerid] == 1) return SendClientMessage(playerid, 0xFF0000AA, "You can´t use this Command in a Dm-Zone! /exitdm");
if(DMZone[playerid] == 2) return SendClientMessage(playerid, 0xFF0000AA, "You can´t use this Command in a Dm-Zone! /exitdm");
if(DMZone[playerid] == 3) return SendClientMessage(playerid, 0xFF0000AA, "You can´t use this Command in a Dm-Zone! /exitdm");
if(DMZone[playerid] == 5) return SendClientMessage(playerid, 0xFF0000AA, "You can´t use this Command in a Dm-Zone! /exitdm");
new giveplayerid = ReturnUser(tmp);
if(giveplayerid != INVALID_PLAYER_ID)
{
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
GetPlayerPos(giveplayerid,pX,pY,pZ);
SetVehiclePos(GetPlayerVehicleID(playerid),pX,pY,pZ+2);
ResetPlayerWeapons(giveplayerid);
}
else
{
GetPlayerPos(giveplayerid,pX,pY,pZ);
SetPlayerPos(playerid,pX,pY,pZ+2);
ResetPlayerWeapons(giveplayerid);
}
SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid));
ResetPlayerWeapons(giveplayerid);
}
else if(giveplayerid == INVALID_PLAYER_ID)
{
format(string, sizeof(string), "%d ist nicht Online!", giveplayerid);
SendClientMessage(playerid, RED, string);
}
return 1;
}
Hoffe mir kann einer helfen.