SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 27/06/2012, 03:45 PM   #1
Little Clucker
Britas's Avatar
Join Date: Nov 2011
Posts: 40
Reputation: 8
Default Magic : D

Where is an error in this code? Because i got wrong result.

stock Veiksmas(playerid, Float:Skaicius, type)
    new Float:RezultatasBendras;
    if(type == 1) RezultatasBendras= floatsub(pInfo[playerid][Bendras], Skaicius);
    else RezultatasBendras= floatadd(pInfo[playerid][Bendras], Skaicius);
    new msg[126];
    format(msg, 126, "1. - %.2f, 2. - %.2f, Result: - %.2f", pInfo[playerid][Bendras], Skaicius, RezultatasBendras);
    SendClientMessage(playerid, -1, msg);
    pInfo[playerid][Bendras] = RezultatasBendras;
    new etcString[18];
    format(etcString, 18, "%.2f", RezultatasBendras);
    SendClientMessage(playerid, -1, etcString);
Result photo:

Thanks, for help.
Britas is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Map] Magic Waterfall [LvZ]Free Maps 13 02/10/2014 10:35 AM
[FilterScript] Magic hillko Filterscripts 6 18/07/2011 12:25 PM
THIS IS MAGIC? OR NOT? Iphone1234g Help Archive 8 17/06/2011 08:18 PM

All times are GMT. The time now is 07:03 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.