[Help]User file Reseting every time and How to connect the coins to Something?
#1

Hello all , When ever i restart my server I,e When I close the samp-server application and open it again , the money , coins get reset , anyone can give me a solution to make it stop and load the stuffs like money when ever i restart?

And I made something call coins , i want to connect it to my /specialguns.. Like we write
/giveplayermoney(playerid , -xMoney);
I want something like when he tap his button to buy special guns he must lose COINS can anyone say me what statement i must use?
Reply
#2

To decrease a variable by a specific amount, use:
pawn Код:
Coins -= 15;
Which will decrease a "Coins"-variable by 15.

Anyways, do you have any saving system?
You need to use etc. an INI or SQL saving system to save/load your coins.
Reply
#3

Not dude , When i restart my Server , everything get's empty , No admins saved , No money , no guns , no car nothing

And i want something to be asked , i don't wanna add more posts , i have a /minigundm cmd , /kart cmd , /dm cmd, I want to make a /leave cmd using zcmd , I.e when we are in anyone of them , the player cmds must be disabled and he can't go to anyother TELE's can anyone help me?
Reply
#4

Dude , something like when we type
GivePlayerMoney(playerid,-500);
GivePlayerWeapon(playerid, x , Ammo);

I want to minus coins from /mycoins !!
And if he don't have coins , take example 10 coins then he must get a msg " Not enough coins "
I just want that 1 line code
Reply
#5

Код:
//coin[playerid] is an example variable
if(coin[playerid] >= 10)
{
      GivePlayerMoney(playerid,-500);
}
else
{
      SendClientMessage(playerid, 0xFFFFFFFF, "Not enough coins");
}
coin[playerid] is an example variable
Reply
#6

Are you using the "coin system" that I gave you?

Anyway:
pawn Код:
if(pCoins[playerid] >= 10)
{
      GivePlayerMoney(playerid, -500);
      pCoins[playerid] -= 10;
}
else SendClientMessage(playerid, 0xFFFFFFFF, "10 coins are required to perform this command.");
Reply
#7

Thanks
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)