Guten Tag leute der Befehl /spec /specoff geht nit why?
Befehl:
ocmd:spec(playerid, params[])
{
new Giveplayerid,String[256], Name2[256];
if (SpielerInfo[playerid][Admin] >= 3)
{
if (sscanf(params, "d", Giveplayerid)) SendClientMessage(playerid,rot, "SERVER: /spec [Playerid]");
else if (!IsPlayerConnected(Giveplayerid)) SendClientMessage(playerid,rot,"Spieler ist nicht online!");
else
{
if ( Specing[Giveplayerid] == 1 )
{
SendClientMessage(playerid, rot, " Diese Person wird bereits gespect.");
}
else
{
GetPlayerName(playerid,Name2,256);
GetPlayerName(Giveplayerid, Name2, 256);
format(String, 256, "[%i] %s spect nun [%i] %s",playerid,Giveplayerid, Name2);
CallLocalFunction("ircRemoteSay", "iss", 1, "#FSE", String);
Specing[playerid] = 1;
}
if ( !IsPlayerInAnyVehicle(Giveplayerid) )
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, Giveplayerid);
SetPlayerInterior(playerid,GetPlayerInterior(Giveplayerid));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(Giveplayerid));
return 1;
}
else
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectateVehicle(playerid, GetPlayerVehicleID(Giveplayerid));
SetPlayerInterior(playerid,GetPlayerInterior(Giveplayerid));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(Giveplayerid));
return 1;
}
}
}
return 1;
}
ocmd:specoff(playerid, params[])
{
#pragma unused params
TogglePlayerSpectating(playerid, 0);
Specing[playerid] = 0;
return 1;
}
Was ich noch fragen wollte wenn man Joint das man bei Tab die Farbe weiß bekommt ??
Auch noch wenn ich /Spawn 2 eingebe dann steht dort die Id:0 also der Name aber die ID:2 wird gespawnt der befehl:
ocmd:spawn(playerid,params[])
{
new string[256],otherid;
new sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
GetPlayerName(playerid,sendername,sizeof(sendername));
GetPlayerName(otherid,giveplayer,sizeof(giveplayer));
if(sscanf(params,"u",otherid)) return SendClientMessage(playerid,rot,"Benutzung: /spawn [ID]");
if(SpielerInfo[playerid][Admin] == 2) return SendClientMessage(playerid,rot,"Du bist kein Admin oder dein Rang ist zu niedrig!");
format(string,sizeof(string),"AdminCMD: Der Admin %s hat den Spieler %s gespawnt.",sendername,giveplayer);
SendClientMessageToAll(ROT,string);
SpawnPlayer(otherid);
return 1;
}