About getplayermoney
#1

HHummm in any other game would work....

In my server you say /rpg and u buy 2 rockets...It works ok and also sends a message to everyoen telling that certain person bought rockets, also i wanted to tell how much money does that player haves....

...
format(string, sizeof string, "$ %s", GetPlayerMoney(playerid));
SendClientMessageToAll(COLOR_GREEN, string);
...

But somehow instead tell how much money the person haves it just says $ ґRPG

Why? getplayermoney cant be used in a message? anyone knows how to print the player money? (to show to everyone so ppl stops crying acussing eachoter of money cheat)

Thanks
Reply
#2

pawn Код:
format(string, sizeof (string), "$%i", GetPlayerMoney(playerid));
Reply
#3

"i = integer, eg: 1, 2, 3, 4, 5"

"s = string, eg: hi, hello, nub"

"d = same as i"

"f = float, eg: 100.0, 2.5"

won't list all of them, but make some searches before u make this kind of topics D:
Reply
#4

i did the search, thanks too much....but i did not found any tutorial or good example with different types of formats...i really do searchs before post...but maybe the search is broken..whatever i serach for i allways find the same 4 role play server topics....its really annoying
Reply
#5

Here you have all the type of format strings: https://sampwiki.blast.hk/wiki/Format
The wiki has lots of useful information, it always comes handy.
Reply
#6

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
"i = integer, eg: 1, 2, 3, 4, 5"

"s = string, eg: hi, hello, nub"

"d = same as i"

"f = float, eg: 100.0, 2.5"

won't list all of them, but make some searches before u make this kind of topics D:
You forgot:

x = hex, eg: 0xFFFFFFFF
c = character
%% = '%'

:P
Reply
#7

Quote:
Originally Posted by MrDeath
Посмотреть сообщение
You forgot:

x = hex, eg: 0xFFFFFFFF
c = character
%% = '%'

:P
He said he's not listing them all :P.


And you forgot '%b' for binary hehe.
Reply
#8

Quote:
Originally Posted by Kyosaur
Посмотреть сообщение
He said he's not listing them all :P.


And you forgot '%b' for binary hehe.
O:, really, I didn't know about binary :P
Reply
#9

well thanks u guys it worked now no one gonna moneycheat =3
Reply
#10

Ok, lol, this topic is the best.. But anyway. Why the searching is so f'd, i have looked for something with almost exact match, but no, it's like - first is something very new, then comes some RP, then it's the streamer plugin, next goes more RP, then it's often Suggestions for next versions too, then it's all the other plugins (I was lucky that the plugin was in list, but afterwards i noticed, that it's a plugin which always is in list ) and then, like 15th result could be something useful. Basicly, i have no idea how to deal with this new search.. And more ontopic : don't printf("%s" or "%c" anything under like 30 ) (Enjoy the wierd command window commands if you do. Don't blame me if you do sht.)

Btw, thanks for extra info ******, will be waiting for it (Really, time format is useful in what i'm planning).
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)