23.03.2010, 14:16
Define something like a max money amount?
As i have
but then how to use GetPlayerMoney on it? xD
As i have
Код:
#define Max_MoneyAmount 1000000000
#define Max_MoneyAmount 1000000000
if(GetPlayerMoney[playerid] == your define) { // rape player to death return 1; }
if(GetPlayerWeapon(playerid) - Allowed_Weapons)
Originally Posted by Lajko1
i think it is
Код:
if(GetPlayerMoney[playerid] == your define) { // rape player to death return 1; } |
if(GetPlayerMoney(playerid) == 10000)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xFFADSADS, "You can't have more than $10000, but since you had, you died !");
SendClientMessage(playerid, 0xFFADSADS, "Your money was set to '10000' !");
SetPlayerMoney(playerid, 10000); //Dunno if you got a function like this..
return 1;
}
if(GetPlayerMoney(playerid) > 10000)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xFFADSADS, "You can't have more than $10000, but since you had, you died !");
SendClientMessage(playerid, 0xFFADSADS, "Your money was set to '10000' !");
SetPlayerMoney(playerid, 10000); //Dunno if you got a function like this..
return 1;
}
== // The value is equal to the other value.
>= // The value is more than or equal to the other value.
<= // The value is less than or equal to the other value.
> // The value is more than the other value.
< // The value is less than the other value.
!= // The value does not equal the other value.
Originally Posted by laser50
can i do Only = or should i rwally do >=?
|
if(GetPlayerWeapon(playerid) == Allowed_Weapons)
C:\Documents and Settings\Wouter\Bureaublad\Sa-MP Scripting\filterscripts\rcon_cmds.pwn(548) : error 001: expected token: ";", but found "if" C:\Documents and Settings\Wouter\Bureaublad\Sa-MP Scripting\filterscripts\rcon_cmds.pwn(548) : warning 206: redundant test: constant expression is non-zero