Hallo Brotfische,
immer wenn ich bei mir auf den Server /f [Text] eingebe crasht der Server
Weiss einer woran es liegt?
Hier die PWN:
ocmd:f(playerid, params[])
{
if(SpielerInfo[playerid][Firma] == 1)
{
new nachricht;
new xname[MAX_PLAYER_NAME];
GetPlayerName(playerid,xname,sizeof(xname));
if(sscanf(params,"s",nachricht))
{
return SendClientMessage(playerid,COLOR_GRAU,"Verwende /f [Text]");
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(SpielerInfo[i][Firma] == 1)
{
new string[128];
format(string,sizeof(string),"[HITMAN]%s: %s",xname, nachricht);
SendClientMessage(i,COLOR_FAMILYCHAT,string);
return 1;
}
}
}
else if(SpielerInfo[playerid][Firma] == 2)
{
new nachricht;
new xname[MAX_PLAYER_NAME];
GetPlayerName(playerid,xname,sizeof(xname));
if(sscanf(params,"s",nachricht))
{
return SendClientMessage(playerid,COLOR_GRAU,"Verwende /f [Text]");
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(SpielerInfo[i][Firma] == 2)
{
new string[128];
format(string,sizeof(string),"[Police]%s: %s",xname, nachricht);
SendClientMessage(i,COLOR_FAMILYCHAT,string);
return 1;
}
}
}
else if(SpielerInfo[playerid][Firma] == 3)
{
new nachricht;
new xname[MAX_PLAYER_NAME];
GetPlayerName(playerid,xname,sizeof(xname));
if(sscanf(params,"s",nachricht))
{
return SendClientMessage(playerid,COLOR_GRAU,"Verwende /f [Text]");
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(SpielerInfo[i][Firma] == 3)
{
new string[128];
format(string,sizeof(string),"[SAN News]%s: %s",xname, nachricht);
SendClientMessage(i,COLOR_FAMILYCHAT,string);
return 0;
}
}
}
else if(SpielerInfo[playerid][Firma] == 4)
{
new nachricht;
new xname[MAX_PLAYER_NAME];
GetPlayerName(playerid,xname,sizeof(xname));
if(sscanf(params,"s",nachricht))
{
return SendClientMessage(playerid,COLOR_GRAU,"Verwende /f [Text]");
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(SpielerInfo[i][Firma] == 4)
{
new string[128];
format(string,sizeof(string),"[Taifun]%s: %s",xname, nachricht);
SendClientMessage(i,COLOR_FAMILYCHAT,string);
return 0;
}
}
}
else if(SpielerInfo[playerid][Firma] == 5)
{
new nachricht;
new xname[MAX_PLAYER_NAME];
GetPlayerName(playerid,xname,sizeof(xname));
if(sscanf(params,"s",nachricht))
{
return SendClientMessage(playerid,COLOR_GRAU,"Verwende /f [Text]");
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(SpielerInfo[i][Firma] == 5)
{
new string[128];
format(string,sizeof(string),"[Medics]%s: %s",xname, nachricht);
SendClientMessage(i,COLOR_FAMILYCHAT,string);
return 0;
}
}
}
else if(SpielerInfo[playerid][Firma] == 6)
{
new nachricht;
new xname[MAX_PLAYER_NAME];
GetPlayerName(playerid,xname,sizeof(xname));
if(sscanf(params,"s",nachricht))
{
return SendClientMessage(playerid,COLOR_GRAU,"Verwende /f [Text]");
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(SpielerInfo[i][Firma] == 6)
{
new string[128];
format(string,sizeof(string),"[Al Qaida]%s: %s",xname, nachricht);
SendClientMessage(i,COLOR_FAMILYCHAT,string);
return 0;
}
}
}
else if(SpielerInfo[playerid][Firma] == 7)
{
new nachricht;
new xname[MAX_PLAYER_NAME];
GetPlayerName(playerid,xname,sizeof(xname));
if(sscanf(params,"s",nachricht))
{
return SendClientMessage(playerid,COLOR_GRAU,"Verwende /f [Text]");
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(SpielerInfo[i][Firma] == 7)
{
new string[128];
format(string,sizeof(string),"[Ghostrider]%s: %s",xname, nachricht);
SendClientMessage(i,COLOR_FAMILYCHAT,string);
return 0;
}
}
}
return 1;
}