experience - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: experience (
/showthread.php?tid=134905)
experience -
Dainyzxz - 18.03.2010
Код:
new Cash = random(4000)+8000;
EXP[playerid] += random(100)+400;
new string[256];
format(string, 256, "You have sell your car and get: $%d ir %d EXP.", Cash, EXP[playerid]);
SendClientMessage(playerid, COLOR_SYSTEM, string);
GivePlayerMoney(playerid, Cash);
this code show, how much player have EXP, but i need that this script will show what player get EXP at the moment.
(p.s. very bad english, sor)
can anyone help me with it ?
Re: experience -
Babul - 18.03.2010
if you want to tell how much experience got added, you need one more variable:
Код:
new Cash = random(4000)+8000;
new EXPadded = random(100)+400;
EXP[playerid] += EXPadded;
new string[256];
format(string, 256, "Car sold for $%d and %d EXP -> now: %d", Cash, EXPadded, EXP[playerid]);
SendClientMessage(playerid, COLOR_SYSTEM, string);
GivePlayerMoney(playerid, Cash);