[Question]I want to wipe the account's money - 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: [Question]I want to wipe the account's money (
/showthread.php?tid=108360)
[Question]I want to wipe the account's money -
TyreXel - 13.11.2009
Hello, I have a server, and I want to make an admin command that can wipe all the money in the accounts of the server (scriptfiles), online and offline, is this possible?
If it is please can someoane tell me how? Or if someone can make the command, I will pe gratefull !
So the ideea is to wipe the money of the server, all the account's to be set to a value of money , no matter if they are Online or Offline ...
Thx.
My gamemode is based on the Godefather edit !
Re: [Question]I want to wipe the account's money -
yom - 13.11.2009
This old post should help you:
http://forum.sa-mp.com/index.php?top...5030#msg345030
Re: [Question]I want to wipe the account's money -
MJ! - 13.11.2009
pawn Код:
public LoadMoney()
{
new arrCoords[2][64];
new strFromFile2[256];
new File: file = fopen("money.ini", io_read);
if (file)
{
fread(file, strFromFile2);
Money = strvalEx(arrCoords[0]);
fclose(file);
return 1;
}
}
pawn Код:
public SaveMoney()
{
new coordsstring[32];
format(coordsstring, sizeof(coordsstring), "%d", Money);
new File: file2 = fopen("money.ini", io_write);
fwrite(file2, coordsstring);
fclose(file2);
return 1;
}
pawn Код:
//OnPlayerCommandText
if(!strcmp(cmdtext,"/resetallmoney",true))
{
if(PlayerInfo[playerid][pAdmin] >= 1338)
{
if(!Money) { Money = 1; SendClientMessage(playerid,0xFFFFFFFF,"All player moneys will be now seted to 1000$.
else { Money = 0; }
}
}
pawn Код:
public OnGameModeInit()
{
LoadMoney();
}
pawn Код:
public OnPlayerConnect(playerid)
{
if(Money) { ResetPlayerMoney(playerid); GivePlayerMoney(playerid,1000); }
}
Simple , isn't ?
Re: [Question]I want to wipe the account's money -
TyreXel - 14.11.2009
I doesn't work
I want it to reset all online and offline player money to a value, example 10k, this command dont do it ...
Please someone help me !
PS: The server is
not running on a SQL ... !
Re: [Question]I want to wipe the account's money -
TyreXel - 14.11.2009
No one?
Please someone tell me if this is possible to do... I have tried everithing I know but it was ussles....
Re: [Question]I want to wipe the account's money -
Peter_Corneile - 14.11.2009
Bump
Re: [Question]I want to wipe the account's money -
yom - 14.11.2009
Quote:
Originally Posted by TyreXel
No one? Please someone tell me if this is possible to do... I have tried everithing I know but it was ussles....
|
Have you at least clicked the link i posted?
Re: [Question]I want to wipe the account's money -
TyreXel - 14.11.2009
Problem solved, I did something else that sets players money to 10k when they login and it works
Thx for those ho helped me !