SA-MP Forums Archive
Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (/showthread.php?tid=616518)



Help - Micko123 - 06.09.2016

PHP код:
if(Pecanje[playerid] == 14 && RibarVozila(vehicleid) && GetPlayerState(playerid) == 2)
    {
        if(
IsPlayerInRangeOfPoint(playerid10.0, -2229.38942422.5735, -0.3816))
        {
            new 
novac 5000 random(2000), string[50];
            
SPP(playerid, -2206.87042394.13674.9609);
            
GivePlayerMoney(playeridnovac);
            
format(stringsizeof(string), S_SRVBOJA"Info: "S_BIJELA"You've got %d money"novac);
            
SCM(playerid, -1string);
            
SetVehicleToRespawn(vehicleid);
            
DisablePlayerCheckpoint(playerid);
            
Pecanje[playerid] = 0;
        }
    } 
When i enter that checkpoint everything is fine except it says only
You've got
Why is it not saying ammount of money i got?


Re: Help - Stinged - 06.09.2016

The string size is too small.
Why do you not use the color parameter in SendClientMessage (You're using white here)?
You're wasting 8 cells by adding the color at the beginning of the message.


Re: Help - Micko123 - 06.09.2016

Can you copy it and tell me how should i write it?


Re: Help - Stinged - 06.09.2016

Show me what S_SRVBOJA is defined as.

EDIT: After looking at your code again, I noticed that the string is 50 cells big, which should be enough (At first I didn't notice that it's even there)

Can you explain the problem in details? It only shows "Info: You've got"?


Re: Help - Micko123 - 06.09.2016

This is S_SRVBOJA
PHP код:
#define S_SRVBOJA             "{FFAF00}" 
It is not showing how much money i got. It shows only "Info: You've got" and nothing else


Re: Help - Shinja - 06.09.2016

You are missing 2 "
PHP код:
format(stringsizeof(string), ""S_SRVBOJA"Info: "S_BIJELA"You've got %d money"novac); 



Re: Help - Micko123 - 06.09.2016

rly? that is your answer? dude if that was the problem it wouldn't even show first half of message


Re: Help - saffierr - 07.09.2016

Quote:
Originally Posted by Micko123
Посмотреть сообщение
PHP код:
            GivePlayerMoney(playeridnovac);
            
format(stringsizeof(string), S_SRVBOJA"Info: "S_BIJELA"You've got %d money"novac); 
When i enter that checkpoint everything is fine except it says only
You've got
Why is it not saying ammount of money i got?
Is it just me or... this doesn't make sense in my eyes..?
I'd use, GetPlayerMoney(); to check the player's money.


Re: Help - Stinged - 07.09.2016

Quote:
Originally Posted by saffierr
Посмотреть сообщение
Is it just me or... this doesn't make sense in my eyes..?
I'd use, GetPlayerMoney(); to check the player's money.
He's not getting how much money the player has, he's telling the player that he was given * amount of money.


Re: Help - saffierr - 07.09.2016

Quote:
Originally Posted by Stinged
Посмотреть сообщение
He's not getting how much money the player has, he's telling the player that he was given * amount of money.
Ah I see, now I understand. His english is pretty ..... that's why I understood it wrongly.