How to make a SendClientMessage -
aspire5630 - 19.04.2009
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!");
Re: How to make a SendClientMessage -
kingcesar - 19.04.2009
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?
Re: How to make a SendClientMessage -
aspire5630 - 19.04.2009
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
Re: How to make a SendClientMessage -
afei - 19.04.2009
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 );
}
}
Re: How to make a SendClientMessage -
Francis[French] - 19.04.2009
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
Re: How to make a SendClientMessage -
maij - 19.04.2009
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
Re: How to make a SendClientMessage -
afei - 19.04.2009
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
Re: How to make a SendClientMessage -
Rks25 - 19.04.2009
but it will spam server/user if you have a timer with 500ms...
Re: How to make a SendClientMessage -
maij - 19.04.2009
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.
Re: How to make a SendClientMessage -
Rks25 - 19.04.2009
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.,