How to take playerid money down -
aspire5630 - 24.04.2009
i have a weapon menu,
i have a gun set price at 500
so i have
GivePlayerMoney(playerid, 500);
but you can still buy it, even if you have 0 dollars,
you just go into dept,
how do i make it soo you MUST have the correct amount of money to buy it
is it something like
GetPlayerMoney(
Re: How to take playerid money down -
Backwardsman97 - 24.04.2009
pawn Код:
if(GetPlayerMoney(playerid) >= 500)
Re: How to take playerid money down -
OmeRinG - 24.04.2009
and to take his money do:
SetPlayerMoney(playerid,-500);
Re: How to take playerid money down -
aspire5630 - 25.04.2009
Quote:
Originally Posted by OmeRinG
and to take his money do:
SetPlayerMoney(playerid,-500);
|
#
Ok and will that make it, soo if you dont have enough money, u cant buy it?
Re: How to take playerid money down -
mooman - 25.04.2009
Quote:
Originally Posted by aspire5630
Quote:
Originally Posted by OmeRinG
and to take his money do:
SetPlayerMoney(playerid,-500);
|
#
Ok and will that make it, soo if you dont have enough money, u cant buy it?
|
no, but this will:
Quote:
Originally Posted by backwardsman97
pawn Код:
if(GetPlayerMoney(playerid) >= 500)
|
Re: How to take playerid money down -
bogeymanEST - 25.04.2009
Quote:
Originally Posted by OmeRinG
and to take his money do:
SetPlayerMoney(playerid,-500);
|
Correction:
pawn Код:
GivePlayerMoney(playerid, -500);
Re: How to take playerid money down -
aspire5630 - 28.04.2009
Quote:
Originally Posted by bogeyman_EST
Quote:
Originally Posted by OmeRinG
and to take his money do:
SetPlayerMoney(playerid,-500);
|
Correction:
pawn Код:
GivePlayerMoney(playerid, -500);
|
Noop doesent work
says "unkown Command"
but still gives you the nos, and dosent take $500 of you, Gives you it for free :S
Re: How to take playerid money down -
aspire5630 - 29.04.2009
Sorry for double post
Anyone know? :P
how to make it, so it takes your money down, but you NEED THE amount of money or more to buy it
not just
GivePlayerMoney(playerid, -1000);
because if you dont have 1000 it just puts you in debt, i need one where if you dont have enough, you cant buy it
Re: How to take playerid money down -
Backwardsman97 - 30.04.2009
I already put it.
pawn Код:
if(GetPlayerMoney(playerid) >= 500)
{
//They don't have enough cash
return 1;
}
If that doesn't work then post your command because it means you are putting it in wrong.
Re: How to take playerid money down -
aspire5630 - 30.04.2009
Quote:
Originally Posted by backwardsman97
I already put it.
pawn Код:
if(GetPlayerMoney(playerid) >= 500) { //They don't have enough cash return 1; }
If that doesn't work then post your command because it means you are putting it in wrong.
|
]
Not worked
this is my code
Код:
if(strcmp(cmdtext, "/nos", true) == 0){
if(IsPlayerInAnyVehicle(playerid)) {
switch(GetVehicleModel( GetPlayerVehicleID(playerid) )) {
case 448,461,462,463,468,471,509,510,521,522,523,581,586,449:
return SendClientMessage(playerid,0xFFFF00AA,"ERROR: You can not tune this vehicle!");
}
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
if(GetPlayerMoney(playerid) >= 500)
SendClientMessage(playerid, RED,"You Cannot Afford This!!!");
SendClientMessage(playerid,0xFFFF00AA,"Nos Installed, $1000");
return PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
} else return SendClientMessage(playerid,0xFFFF00AA,"ERROR: You must be in a vehicle.");
}