2 questions ??
#1

Hi guys i have two things that i dont know how to script it
1.i know which line is for gray colour 0xAAAAAAAA how which
line is for light green colour and red colour
2.how i make when somebody has -10,000$ he goes to jail

ok that is all
thanks
Reply
#2

1. http://www.gtagarage.com/mods/show.php?id=2598 ( SAMP Color Picker )
2. if(GetPlayerMoney(playerid) == -10000)

On 2. Im not so sure, Try it though
Reply
#3

1. http://www.2createawebsite.com/build/hex-colors.html, you can pick them there. Just remove the '#', and add 0x in front, and AA (or 00 - 99) at the back.
Reply
#4

Quote:
Originally Posted by VonLeeuwen
1. http://www.2createawebsite.com/build/hex-colors.html, you can pick them there. Just remove the '#', and add 0x in front, and AA (or 00 - 99) at the back.
http://www.gtagarage.com/mods/show.php?id=2598
Is better as you dont have to remove the # and whatever,
Its made especially for SAMP
Reply
#5

And it has all colors?
Reply
#6

Question 1:

I recommend to you use any software to generate colours code. Type "colour picker" in search.

Question 2:

First you must create a timer to always check if the player has the money:
In Top of your GameMode/Fs:
pawn Код:
CheckMoney();
In OnGameModeInit/OnFilterScriptInit
pawn Код:
SetTimer("CheckMoney",1000,1); //1 second
Second, you must create a function to verify player money:
(Put in any anywhere):
pawn Код:
public CheckMoney()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerMoney(i) == -10000)
{
//JAIL FUNCTION HERE
}
}
return 1;
}
Reply
#7

pawn Код:
public OnGameModeInit()
{
    SetTimer("MoneyCheck", 1000, 1);
    return 0;
}

forward MoneyCheck();
public MoneyCheck()
{
    new
        id = 0,
        max = GetMaxPlayers();
    for(; id < max; id++)
    {
        if(GetPlayerMoney(id) <= -10000)
        {
            //jail player
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)