GameTextForAll
#4

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
Plus, you don't need the string, waste of 128 cells

pawn Код:
GameTextForAll( Announcement, 5000, 3 );
Will do exactly the same.
Quote:
Originally Posted by playbox12
Посмотреть сообщение
pawn Код:
if(strlen(Ann) >= 1)
Bad

pawn Код:
if(strlen(Announcement) >= 1)
Good

You are checking the length, of a non existing string, thats why you don't see anything


Also if you are using the sscanf2 plugin, use 's[128]' instead of 'z' Its outdated.
Okay well here is my code now:

Код:
command(ann, playerid, params[])
{
	new Announcement[128], string[ 128 ];
	if( sscanf( params, "z", Announcement) )
	{
		if( Player[playerid][AdminLevel] >= 1 )
	    {
			SendClientMessage( playerid, WHITE, "SYNTAX: /ann [message]" );
		}
	}
	else
	{
	    if( Player[playerid][AdminLevel] >= 1)
	    {
			if(strlen(Announcement) >= 1)
			{
			    GameTextForAll( string, 5000, 3 );
			}
			else
			{
			    SendClientMessage( playerid, WHITE, "SYNTAX: /ann [message]" );
			}
		}
	}
	return 1;
}
Still not working tryed to add "[128]" if i add that it just keep sending "SYNTAX: /ann [message]"
no matter what you type.. but with "z" no responds at all :/
Reply


Messages In This Thread
GameTextForAll - by FrankC - 26.09.2010, 11:04
Re: GameTextForAll - by playbox12 - 26.09.2010, 11:08
Re: GameTextForAll - by [XST]O_x - 26.09.2010, 11:17
Re: GameTextForAll - by FrankC - 26.09.2010, 11:21
Re: GameTextForAll - by playbox12 - 26.09.2010, 11:42
Re: GameTextForAll - by FrankC - 26.09.2010, 13:37
Re: GameTextForAll - by FrankC - 26.09.2010, 13:46

Forum Jump:


Users browsing this thread: 1 Guest(s)