admin chat code has a bug
#1

hi,

just put together a code for an admin chat.
It works fine but if i got a space in my text (u know the space between 2 words), everything behind the space does not appear in the admin chat anymore.
Whats the error?

pawn Код:
dcmd_a(playerid,params[])
{
new text[256];
if(Spieler[playerid][AdminLevel] == 0)
{
return SendClientMessage(playerid, 0xFF0000FF, "You are not an admin!");
}
if(sscanf(params,"s[256]",text))
{
new str[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof name);
format(str,sizeof str,"[ADMIN] %s: %s",name,text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Spieler[i][eingeloggt] == 1)
{
if(Spieler[playerid][AdminLevel] > 0)
{
SendClientMessage(i,0xFF66FFAA,str);
}
}
}
}
}
return 1;
}
thx in advance.
Reply


Messages In This Thread
admin chat code has a bug - by BlackWolf120 - 12.03.2011, 01:59
Re: admin chat code has a bug - by omer5198 - 12.03.2011, 04:45
Re: admin chat code has a bug - by Kwarde - 12.03.2011, 05:48
Re: admin chat code has a bug - by BlackWolf120 - 12.03.2011, 14:05
Re: admin chat code has a bug - by Kwarde - 12.03.2011, 14:09
Re: admin chat code has a bug - by HyperZ - 12.03.2011, 14:14
Re: admin chat code has a bug - by Kwarde - 12.03.2011, 14:22
Re: admin chat code has a bug - by HyperZ - 12.03.2011, 14:25
Re: admin chat code has a bug - by Kwarde - 12.03.2011, 14:27
Re: admin chat code has a bug - by HyperZ - 12.03.2011, 14:30

Forum Jump:


Users browsing this thread: 2 Guest(s)