How to make a SendClientMessage
#1

Ok, i would like to make it soo, soon as you get in dept,
it comes up in the chat saying
SendClientMessage(playerid, RED " Your In dept, You Have Until Next Bank Time To Get Out, Or You Goto Jail!");
Reply
#2

Quote:
Originally Posted by aspire5630
Ok, i would like to make it soo, soon as you get in dept,
it comes up in the chat saying
SendClientMessage(playerid, RED " Your In dept, You Have Until Next Bank Time To Get Out, Or You Goto Jail!");
- - What will you do?
Reply
#3

huh?

i would like to make if, when you get in dept
it pops up in the chat, saying
You have until next banktime to get out of dept or you goto jail

what code do i need :S
Reply
#4

In case i understood you right.. Make a timer which checks whether a player has less money than 0 or not. If the player has less than 0 send him the message.

simple loop
Код:
for( new i = 0; i < MAX_PLAYERS; i++ )
{
    if( GetPlayerMoney(i) < 0 )
    {
        SendClientMessage( i, color, msg );
    }
}
Reply
#5

Quote:
Originally Posted by afei™
In case i understood you right.. Make a timer which checks whether a player has less money than 0 or not. If the player has less than 0 send him the message.

simple loop
Код:
for( new i = 0; i < MAX_PLAYERS; i++ )
{
    if( GetPlayerMoney(i) < 0 )
    {
        SendClientMessage( i, color, msg );
    }
}
Hi there,

This will just spam the user hundred of times until he earns some money. That's stupid.

Have fun scripting.

Kind regards,

Francis Morissette
SA-MP Scripter
http://sa-mp.com
Reply
#6

Quote:
Originally Posted by [SAP
Francis ]
Quote:
Originally Posted by afei™
In case i understood you right.. Make a timer which checks whether a player has less money than 0 or not. If the player has less than 0 send him the message.

simple loop
Код:
for( new i = 0; i < MAX_PLAYERS; i++ )
{
    if( GetPlayerMoney(i) < 0 )
    {
        SendClientMessage( i, color, msg );
    }
}
Hi there,

This will just spam the user hundred of times until he earns some money. That's stupid.

Have fun scripting.

Kind regards,

Francis Morissette
SA-MP Scripter
http://sa-mp.com
that doesnt have to, because he didnt used an public or stock or whatever.

it could be a timer, that is set to 15 seconds.

and which he says
"Make a timer which checks whether a player has less money than 0 or not. If the player has less than 0 send him the message. "
to stop the loop, just killtimer(timernamevariable);
my favorite use, is to create a variable, that counts up, like 4 x.

on the 5th number ( when variable is 5, then killtimer)

it will display 15s X 4 times
Reply
#7

Quote:
Originally Posted by [SAP
Francis ]
Quote:
Originally Posted by afei™
In case i understood you right.. Make a timer which checks whether a player has less money than 0 or not. If the player has less than 0 send him the message.

simple loop
Код:
for( new i = 0; i < MAX_PLAYERS; i++ )
{
    if( GetPlayerMoney(i) < 0 )
    {
        SendClientMessage( i, color, msg );
    }
}
Hi there,

This will just spam the user hundred of times until he earns some money. That's stupid.

Have fun scripting.

Kind regards,

Francis Morissette
SA-MP Scripter
http://sa-mp.com
It wont spam the user when you include it inside of a public like for example payday or h/e he named his
Reply
#8

but it will spam server/user if you have a timer with 500ms...
Reply
#9

Quote:
Originally Posted by Rk_
but it will spam server/user if you have a timer with 500ms...
IF, well said

note that u dont need to be stupid when it comes to programming/scripting.

well i naturally expect every programmer/scripter not to be stupid.

i mean, who would create a timer for sending text with 500ms... (execptions allowed, like for testing certain stuff)

if anyone feels like this, u better can stop scripting, but i hope u dont. just improof ur skills.
Reply
#10

it was just an example.

if you were that smart, you should also know how to make a loop don't you....?

Anyways, i don't wanna discuss.,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)