I need help with making Paying system - 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: I need help with making Paying system (
/showthread.php?tid=453082)
I need help with making Paying system -
Zigonja - 23.07.2013
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);
}
}
Re: I need help with making Paying system -
Zigonja - 24.07.2013
Please? I really need help with this
Re : I need help with making Paying system -
Garwan50 - 24.07.2013
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