I need help with making Paying system
#1

So I need someone to show me some code with dini or normal samp code, not Y_ini because the server im working for doesn't have it. However I need something like a garage system, each time person writes a command /paytoll he looses 500$, I made that work but I need that money to add and save, because I want to make a command like /collectmoney that will give all the money from the garage atm

This is the code I worked so far:
pawn Код:
if(canopen == 1)
        {
            if(IsPlayerInRangeOfPoint(playerid, 8, 631.2999900,-1193.0000000,19.3000000))
            {
                new empety[256];
                new money;
                new File:ftw=fopen("armymoneycollect.txt", io_write);
                MoveDynamicObject(tunnel, 631.2999900,-1193.0000000, 14.89999961853, 5);
                SendClientMessage(playerid, COLOR_BLUE,"* Border Sucessfully opened, closing in 5 seconds!");
                SetTimer("tunnelc", 5000, false);
                GivePlayerMoney(playerid, -500);
                if(ftw)
                {
                    fread(ftw, empety);
                    money += 500;
                    format(empety,sizeof(empety),"%d", money);
                    fwrite(ftw, empety);
                    SendClientMessage(playerid, -1, empety);
                    fclose(ftw);
                }
            }
Reply
#2

Please? I really need help with this
Reply
#3

Mhhh, maybe i'm wrong, but rather than saving the player's money, just save it with the callback OnPlayerDisconnect, less work to do lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)