Wenn ich schreibe im Ankündigungschat, dann kann man immer nur das erste Wort Lesen.
Mehr wird nicht angeziegt.
Bitte um Hilfe.
ocmd:ak(playerid,params[])
{
new sendername[128];
new result[128];
if(!sscanf(params,"s[128]",result))return SendClientMessage(playerid,weiss,"INfo: Ak [Text]");
if(GetPVarInt(playerid,"Adminlevel") <= 3)return SendClientMessage(playerid,weiss,"Du bist kein Admin");
GetPlayerName(playerid, sendername, sizeof(sendername));
if(GetPVarInt(playerid,"Adminlevel") == 10)
{
new string[128];
format(string,sizeof(string),"(( ServerOwner %s: %s ))",SpielerName(playerid),result);
SendClientMessageToAll(weiss,string);
return 1;
}
else if(GetPVarInt(playerid,"Adminlevel") == 9)
{
new string[128];
format(string,sizeof(string),"(( Techniker %s: %s ))",SpielerName(playerid),result);
SendClientMessageToAll(weiss,string);
return 1;
}
else if(GetPVarInt(playerid,"Adminlevel") == 8)
{
new string[128];
format(string,sizeof(string),"(( Co Owner %s: %s ))",SpielerName(playerid),result);
SendClientMessageToAll(weiss,string);
return 1;
}
else if(GetPVarInt(playerid,"Adminlevel") == 7)
{
new string[128];
format(string,sizeof(string),"(( Servermanager %s: %s ))",SpielerName(playerid),result);
SendClientMessageToAll(weiss,string);
return 1;
}
else if(GetPVarInt(playerid,"Adminlevel") == 6)
{
new string[128];
format(string,sizeof(string),"(( CumLeiter %s: %s ))",SpielerName(playerid),result);
SendClientMessageToAll(weiss,string);
return 1;
}
else if(GetPVarInt(playerid,"Adminlevel") == 5)
{
new string[128];
format(string,sizeof(string),"(( Headadmin %s: %s ))",SpielerName(playerid),result);
SendClientMessageToAll(weiss,string);
return 1;
}
else if(GetPVarInt(playerid,"Adminlevel") == 4)
{
new string[128];
format(string,sizeof(string),"(( Server-Admin %s: %s ))",SpielerName(playerid),result);
SendClientMessageToAll(weiss,string);
return 1;
}
else if(GetPVarInt(playerid,"Adminlevel") == 3)
{
new string[128];
format(string,sizeof(string),"(( Server-Moderator %s: %s ))",SpielerName(playerid),result);
SendClientMessageToAll(weiss,string);
return 1;
}
return 1;
}
>> Ankündigungschat geht nicht.>>
- Batista
- Geschlossen
- Erledigt
-
-
Warum SpielerName(playerid) wenn du oben Sendername definiert hast ? Das versteh ich nicht ganz.
Pack mal die return 1; raus,da du mit else if arbeitest,brauchst du die nicht
Lg -
Immer noch das Selbe Problem
Und hier brauch ich auch unbeding hilfe.
http://forum.sa-mp.de/san-andreas-multiplayer/scripting-base/163079-mein-ganzes-notrufsystem-geht-nicht/Wer kennt den Mann auf mein Bild ?
-
Hast du mal versucht den string höher zu machen? Also so auf 256?
-
Und immernoch das selbe Problem...
Das kanze sieht nun so aus.
ocmd:ak(playerid,params[])
{
new sendername[256];
new result[256];
if(!sscanf(params,"s[128]",result))return SendClientMessage(playerid,weiss,"INfo: ak [Text]");
if(GetPVarInt(playerid,"Adminlevel") <= 3)return SendClientMessage(playerid,weiss,"Du bist kein Admin");
GetPlayerName(playerid, sendername, sizeof(sendername));
if(GetPVarInt(playerid,"Adminlevel") == 10)
{
new string[256];
format(string,sizeof(string),"(( ServerOwner %s: %s ))",sendername,result);
SendClientMessageToAll(weiss,string);
}
else if(GetPVarInt(playerid,"Adminlevel") == 9)
{
new string[256];
format(string,sizeof(string),"(( Techniker %s: %s ))",sendername,result);
SendClientMessageToAll(weiss,string);
}
else if(GetPVarInt(playerid,"Adminlevel") == 8)
{
new string[256];
format(string,sizeof(string),"(( Co Owner %s: %s ))",sendername,result);
SendClientMessageToAll(weiss,string);
}
else if(GetPVarInt(playerid,"Adminlevel") == 7)
{
new string[256];
format(string,sizeof(string),"(( Servermanager %s: %s ))",sendername,result);
SendClientMessageToAll(weiss,string);
}
else if(GetPVarInt(playerid,"Adminlevel") == 6)
{
new string[256];
format(string,sizeof(string),"(( CumLeiter %s: %s ))",sendername,result);
SendClientMessageToAll(weiss,string);
}
else if(GetPVarInt(playerid,"Adminlevel") == 5)
{
new string[256];
format(string,sizeof(string),"(( Headadmin %s: %s ))",sendername,result);
SendClientMessageToAll(weiss,string);
}
else if(GetPVarInt(playerid,"Adminlevel") == 4)
{
new string[256];
format(string,sizeof(string),"(( Server-Admin %s: %s ))",sendername,result);
SendClientMessageToAll(weiss,string);
}
else if(GetPVarInt(playerid,"Adminlevel") == 3)
{
new string[256];
format(string,sizeof(string),"(( Server-Moderator %s: %s ))",sendername,result);
SendClientMessageToAll(weiss,string);
}
return 1;
} -
ocmd:ak(playerid,params[])
{
new sendername[MAX_PLAYER_NAME];
new result[256];
new string[256];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!sscanf(params,"s",result))return SendClientMessage(playerid,weiss,"INfo: ak [Text]");
if(GetPVarInt(playerid,"Adminlevel") <= 3)return SendClientMessage(playerid,weiss,"Du bist kein Admin");
if(GetPVarInt(playerid,"Adminlevel") == 10) { format(string,sizeof(string),"(( ServerOwner %s: %s ))",sendername,result); }
else if(GetPVarInt(playerid,"Adminlevel") == 9) { format(string,sizeof(string),"(( Techniker %s: %s ))",sendername,result); }
else if(GetPVarInt(playerid,"Adminlevel") == 8) { format(string,sizeof(string),"(( Co Owner %s: %s ))",sendername,result); }
else if(GetPVarInt(playerid,"Adminlevel") == 7) { format(string,sizeof(string),"(( Servermanager %s: %s ))",sendername,result); }
else if(GetPVarInt(playerid,"Adminlevel") == 6) { format(string,sizeof(string),"(( CumLeiter %s: %s ))",sendername,result); }
else if(GetPVarInt(playerid,"Adminlevel") == 5) { format(string,sizeof(string),"(( Headadmin %s: %s ))",sendername,result); }
else if(GetPVarInt(playerid,"Adminlevel") == 4) { format(string,sizeof(string),"(( Server-Admin %s: %s ))",sendername,result); }
else if(GetPVarInt(playerid,"Adminlevel") == 3) { format(string,sizeof(string),"(( Server-Moderator %s: %s ))",sendername,result); }
SendClientMessageToAll(weiss,string);
return 1;
}
Hab das ganze mal etwas umgescriptet, vielleicht ist der Fehler dadurch ja verschwunden^^ -
Vielen Dank, jetzt gehts endlich
ich brauch aber noch hilfe hierbei
http://forum.sa-mp.de/san-andreas-multiplayer/scripting-base/163079-mein-ganzes-notrufsystem-geht-nicht/ -
breadfish.de
Hat das Thema geschlossen.