problema
#1

Consegui um filterscrip aki no forum q muda a cor do dinheiro so q istalei e fico assim


/imageshack/img706/6298/novo2c.png

se alguem saber como q tira a parte de tras ou fique a parte cinza em cima da verde direito ta bom
Reply
#2

Que eu saiba, esse verde e parte do fs.
de qualquer forma, passa o codigo do fs
Reply
#3

A parte verde й padrгo do SA:MP.
Reply
#4

Tem como colocar a parte cinza em cima do verde

naum sei se e isso mais tai


// Setup
#include <a_samp>

new CurCol[MAX_PLAYERS] = 0;
new Conn[MAX_PLAYERS] = 0;
new Money[MAX_PLAYERS] = 0;
new Text:MoneyTxt[MAX_PLAYERS];

// You can change the color in the define's below.
#define COLOR_GreenMoney 0xC0C0C0AA
#define COLOR_YellowMoney 0xC0C0C0AA
#define COLOR_RedMoney 0xC0C0C0AA
#define COLOR_GreyMoney 0xC0C0C0AA
/*
Was going to do some things with boxes but it got a little buggy so I commented out the boxes.
Theese defines were some colors to use for the boxes. Don't worry about them.
#define COLOR_GreenBox 0x00ff00cc
#define COLOR_YellowBox 0xffff00cc
#define COLOR_RedBox 0xff0000cc
#define COLOR_GreyBox 0xC0C0C0cc
*/
// Main
public OnPlayerUpdate(playerid)
{
if(Conn[playerid] == 1 && CurCol[playerid] != 0)
{
if(GetPlayerMoney(playerid) != Money[playerid] && GetPlayerMoney(playerid) != 0)
{
new string[13];
if(GetPlayerMoney(playerid) > 0 && GetPlayerMoney(playerid) <= 999999999)
{
if(GetPlayerMoney(playerid) < 10)
{
format(string, sizeof(string), "$0000000%i", GetPlayerMoney(playerid));
}
else if(GetPlayerMoney(playerid) <= 99)
{
format(string, sizeof(string), "$000000%i", GetPlayerMoney(playerid));
}
else if(GetPlayerMoney(playerid) <= 999)
{
format(string, sizeof(string), "$00000%i", GetPlayerMoney(playerid));
}
else if(GetPlayerMoney(playerid) <= 9999)
{
format(string, sizeof(string), "$0000%i", GetPlayerMoney(playerid));
}
else if(GetPlayerMoney(playerid) <= 99999)
{
format(string, sizeof(string), "$000%i", GetPlayerMoney(playerid));
}
else if(GetPlayerMoney(playerid) <= 999999)
{
format(string, sizeof(string), "$00%i", GetPlayerMoney(playerid));
}
else if(GetPlayerMoney(playerid) <= 9999999)
{
format(string, sizeof(string), "$0%i", GetPlayerMoney(playerid));
}
else if(GetPlayerMoney(playerid) <= 99999999)
{
format(string, sizeof(string), "$%i", GetPlayerMoney(playerid));
}
}
else if(GetPlayerMoney(playerid) < 0 && GetPlayerMoney(playerid) >= -999999999)
{
new TheNewMoney = GetPlayerMoney(playerid) * -1;
if(GetPlayerMoney(playerid) > -10)
{
format(string, sizeof(string), "$0000000%i", TheNewMoney);
}
else if(GetPlayerMoney(playerid) >= -99)
{
format(string, sizeof(string), "$000000%i", TheNewMoney);
}
else if(GetPlayerMoney(playerid) >= -999)
{
format(string, sizeof(string), "$00000%i", TheNewMoney);
}
else if(GetPlayerMoney(playerid) >= -9999)
{
format(string, sizeof(string), "$0000%i", TheNewMoney);
}
else if(GetPlayerMoney(playerid) >= -99999)
{
format(string, sizeof(string), "$000%i", TheNewMoney);
}
else if(GetPlayerMoney(playerid) >= -999999)
{
format(string, sizeof(string), "$00%i", TheNewMoney);
}
else if(GetPlayerMoney(playerid) >= -9999999)
{
format(string, sizeof(string), "$0%i", TheNewMoney);
}
else if(GetPlayerMoney(playerid) >= -99999999)
{
format(string, sizeof(string), "$%i", TheNewMoney);
}
}
TextDrawSetString(MoneyTxt[playerid], string);
}
if(CurCol[playerid] != 1 && GetPlayerMoney(playerid) >= 20000) // You can change the default >= and 20000 to whatever you wish. This means if they have 20000 or greater cash their money will be the color green.
{
CurCol[playerid] = 1;
TextDrawHideForPlayer(playerid,MoneyTxt[playerid]);
//TextDrawBoxColor(MoneyTxt[playerid],COLOR_GreenBox);
TextDrawColor(MoneyTxt[playerid],COLOR_GreenMoney);
TextDrawShowForPlayer(playerid,MoneyTxt[playerid]);
}
else if(CurCol[playerid] != 3 && GetPlayerMoney(playerid) < 0) // You can change the default < and 0 to whatever you wish. This means if they have less than 0 cash (negative cash) their money will be the color red.
{
CurCol[playerid] = 3;
TextDrawHideForPlayer(playerid,MoneyTxt[playerid]);
//TextDrawBoxColor(MoneyTxt[playerid],COLOR_RedBox);
TextDrawColor(MoneyTxt[playerid],COLOR_RedMoney);
TextDrawShowForPlayer(playerid,MoneyTxt[playerid]);
}
else if(CurCol[playerid] != 2 && GetPlayerMoney(playerid) < 20000 && GetPlayerMoney(playerid) > 0) // You can change the default < and 20000 to whatever you wish. This means if they have less than 20000 cash their money will be the color yellow.
{
CurCol[playerid] = 2;
TextDrawHideForPlayer(playerid,MoneyTxt[playerid]);
//TextDrawBoxColor(MoneyTxt[playerid],COLOR_YellowBox);
TextDrawColor(MoneyTxt[playerid],COLOR_YellowMoney);
TextDrawShowForPlayer(playerid,MoneyTxt[playerid]);
}
if(CurCol[playerid] != 4 && GetPlayerMoney(playerid) == 0)
{
CurCol[playerid] = 4;
TextDrawHideForPlayer(playerid,MoneyTxt[playerid]);
//TextDrawBoxColor(MoneyTxt[playerid],COLOR_GreyBox);
TextDrawColor(MoneyTxt[playerid],COLOR_GreyMoney);
TextDrawShowForPlayer(playerid,MoneyTxt[playerid]);
TextDrawSetString(MoneyTxt[playerid], "$00000000");
}
}
return 0;
}

public OnPlayerConnect(playerid)
{
Conn[playerid] = 2;
CurCol[playerid] = 0;
return 1;
}

public OnPlayerSpawn(playerid)
{
if(Conn[playerid] == 2)
{
MoneyTxt[playerid] = TextDrawCreate(498.000000,73.000000,"$00000000");
TextDrawAlignment(MoneyTxt[playerid],0);
TextDrawBackgroundColor(MoneyTxt[playerid],0x000000ff);
TextDrawFont(MoneyTxt[playerid],3);
TextDrawLetterSize(MoneyTxt[playerid],0.599999,2.899999);
TextDrawColor(MoneyTxt[playerid],COLOR_GreenMoney);
//TextDrawUseBox(MoneyTxt[playerid],1);
//TextDrawBoxColor(MoneyTxt[playerid],COLOR_GreenBox);
TextDrawSetOutline(MoneyTxt[playerid],1);
TextDrawSetProportional(MoneyTxt[playerid],1);
TextDrawShowForPlayer(playerid, MoneyTxt[playerid]);
CurCol[playerid] = 1;
Conn[playerid] = 1;
}
return 1;
}

public OnPlayerDisconnect(playerid)
{
TextDrawDestroy(MoneyTxt[playerid]);
Conn[playerid] = 0;
CurCol[playerid] = 0;
return 1;
}
Reply
#5

Por favor coloque isso no Pastbin.
Reply
#6

coloquei agora fasso oq ?

aki ta um erro tb q naum consigo resolver

warning 219: local variable "string" shadows a variable at a preceding level
Reply
#7

esse erro tava antes ? ou so ta agora?
Colocou o que?
Nao entendi nada do que voce falou
Reply
#8

Foi o diretor ele pediu pra mim colocar o fs no Pastbin

o erro do dinheiro naum da para apagar o verde entao tem como colocar por cima ?
e akele outro erro q coloquei e pq tb tenho este erro q naum consigo resolver
Reply
#9

Passe o link do pastebin por favor, e a linha do erro tambem
Reply
#10

http://samp.pastebin.com/


C:\Documents and Settings\Igor\Desktop\samp03bsvr_R2_win32\pawno\in clude\dutils.inc(2 : warning 219: local variable "string" shadows a variable at a preceding level

C:\Documents and Settings\Igor\Desktop\samp03bsvr_R2_win32\pawno\in clude\dutils.inc(132) : warning 219: local variable "string" shadows a variable at a preceding level

C:\Documents and Settings\Igor\Desktop\samp03bsvr_R2_win32\pawno\in clude\dutils.inc(172) : warning 219: local variable "string" shadows a variable at a preceding level

C:\Documents and Settings\Igor\Desktop\samp03bsvr_R2_win32\pawno\in clude\dutils.inc(280) : warning 219: local variable "string" shadows a variable at a preceding level

C:\Documents and Settings\Igor\Desktop\samp03bsvr_R2_win32\pawno\in clude\dutils.inc(337) : warning 219: local variable "string" shadows a variable at a preceding level

tai os erros sao todos os mesmos so q em linhas diferentes
o erro do dinheiro naum e bem um erro e som queria deixa ele por cima do verde e so olhar ali no print
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)