Jump to content

Question

Posted

Tot eu sunt cu aceeasi problema cu paranteza

Am un server de samp stunt iar cand un player scrie ceva ii apare in loc de cuvinte o paranteza dar comenzile si cu toate acelea merg va rog ajutatima daca vreti va dau si gm sa va uitati

8 answers to this question

Recommended Posts

Posted
public OnPlayerText(playerid,text[])
{
	if(IsPlayerFlooding(playerid) && !IsPlayerAdmin(playerid))
	{
	    SendClientMessage(playerid, 0xFF0000FF, "*{CC00FF} You can only send a message once every two seconds.");
	    return 0;
	}
		if(!IsPlayerAdmin(playerid))
	{
		if(strlen(text) == strlen(szPlayerChatMsg[playerid]) && !strcmp(szPlayerChatMsg[playerid], text,  false))
		{
			SendClientMessage(playerid, 0xFF0000FF, "*{CC00FF} Please do not repeat yourself.");
			format(szPlayerChatMsg[playerid], 128, "%s", text);
		    return 0;
		}
	}

	format(szPlayerChatMsg[playerid], 128, "%s", text);
    iPlayerChatTime[playerid] = GetTickCount();

	new rand = random(sizeof(BubbleColors));
	SetPlayerChatBubble(playerid, text, BubbleColors[rand][0], 300.0, 5000);
	if(Language[playerid] == ROM)
    {
	    new MMM[256];
		format(MMM, sizeof(MMM)," %s ", playerid,text);
		SendPlayerMessageToAll(playerid, MMM);
    }
    if(Language[playerid] == ENG)
    {
	    new MMM[256];
		format(MMM, sizeof(MMM)," %s ", playerid,text);
		SendPlayerMessageToAll(playerid, MMM);
	}

Posted

[pawn]public OnPlayerText( playerid, text[ ] )

{

if( IsPlayerFlooding( playerid ) && !IsPlayerAdmin( playerid ) )

{

    SendClientMessage( playerid, 0xFF0000FF, "*{CC00FF} You can only send a message once every two seconds." );

    return ( 0 );

}

if ( !IsPlayerAdmin( playerid ) )

{

if ( strlen( text ) == strlen( szPlayerChatMsg[ playerid ] ) && !strcmp( szPlayerChatMsg[ playerid ], text,  false ) )

{

SendClientMessage( playerid, 0xFF0000FF, "*{CC00FF} Please do not repeat yourself." );

format( szPlayerChatMsg[ playerid ], 128, "%s", text );

return ( 0 );

}

}

format( szPlayerChatMsg[ playerid ], 128, "%s", text );

    iPlayerChatTime[ playerid ] = GetTickCount( );

new rand = random( sizeof( BubbleColors ) );

SetPlayerChatBubble( playerid, text, BubbleColors[ rand ][ 0 ], 300.0, 5000 );

if(Language[playerid] == ROM)

{

new MMM[ 256 ];

format( MMM, sizeof( MMM )," %s ", text );

SendPlayerMessageToAll( playerid, MMM );

}

if ( Language[ playerid ] == ENG )

{

new MMM[ 256 ];

format( MMM, sizeof( MMM ),"%s", text );

SendPlayerMessageToAll( playerid, MMM );

}[/pawn]

Posted

acum imi apare de 2 ori odata ce scriu eu si odata "

Si daca vrei poti sa imi spui knd scriu sa imi arate ex: nume jucator id jucator si ce a scris jucatorul?

Posted

acum imi apare de 2 ori odata ce scriu eu si odata "

Si daca vrei poti sa imi spui knd scriu sa imi arate ex: nume jucator id jucator si ce a scris jucatorul?

Testeaza:

[pawn]public OnPlayerText( playerid, text[ ] )

{

if( IsPlayerFlooding( playerid ) && !IsPlayerAdmin( playerid ) )

{

    SendClientMessage( playerid, 0xFF0000FF, "*{CC00FF} You can only send a message once every two seconds." );

    return ( 0 );

}

if ( !IsPlayerAdmin( playerid ) )

{

if ( strlen( text ) == strlen( szPlayerChatMsg[ playerid ] ) && !strcmp( szPlayerChatMsg[ playerid ], text,  false ) )

{

SendClientMessage( playerid, 0xFF0000FF, "*{CC00FF} Please do not repeat yourself." );

format( szPlayerChatMsg[ playerid ], 128, "%s", text );

return ( 0 );

}

}

format( szPlayerChatMsg[ playerid ], 128, "%s", text );

    iPlayerChatTime[ playerid ] = GetTickCount( );

new rand = random( sizeof( BubbleColors ) );

SetPlayerChatBubble( playerid, text, BubbleColors[ rand ][ 0 ], 300.0, 5000 );

new Text[ 128 ];

    format( Text, 128, "[%d]: %s", playerid, text );

    SendPlayerMessageToAll( playerid, Text );[/pawn]

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.