SA-MP Forums Archive
[Ajuda] Ajuda text - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda text (/showthread.php?tid=623315)



Ajuda text - DaviEzequiel - 30.11.2016

Boa tarde tem como me ajudar/ensinar como eu transformo um text em comando tipo assim

Код:
	if( text[ 0 ] == '@' )
	{
 		if( aInfo[ playerid ][ Admin ] == 1 )
   		{
			strmid( tmp, text, 1, strlen( text ));
	    	if( !strlen( tmp ))
	 		{
				SendClientMessage( playerid, COLOR_ERRO, "| ERRO | Uso correto: @ [ Mensagem ]" );
				return 1;
	       	}
	    	else
	      	{
	        	format( gstring, sizeof( gstring ), "~p~ ] ~w~%s ~p~ ]", tmp );
	         	GameTextForAll( gstring, 5000, 3 );
	     	}
	      	return 0;
        }
	}
Quero transformar ele pra outro comando tipo /A


Respuesta: Ajuda text - SammyJ - 30.11.2016

PHP код:
CMD:a(playeridparams[])
{
    if( 
aInfo[playerid][Admin] == 1)
    {
        if(!
strlen(params))
            return 
SendClientMessage(playeridCOLOR_ERRO"| ERRO | Uso correto: /a [ Mensagem ]" );

        static 
gstring[70];
        
format(gstringsizeofgstring ), "~p~ ] ~w~%s ~p~ ]"params);
         
GameTextForAll(gstring50003);
    }
    return 
true;




Re: Ajuda text - DaviEzequiel - 30.11.2016

Nгo deu