CreatePickup [money] -
Aleksabre - 18.10.2013
about this photo, how can i make instead of wanted level i put for example, deagle, how do I make that you can only have that deagle if you have $1000, if not, it'll say you don't have enough money to get & buy a deagle, whatever, how do I make that?
Re: CreatePickup [money] -
Areax - 18.10.2013
Click me !
Click me !
Re: CreatePickup [money] -
Aleksabre - 18.10.2013
Thanks but, actually I want if you have $1000, and if you pass by the icon you'll get the weapon.
But if you don't have $1000, it'll say you do not have enough money to take this weapon. How do I make that?
Re: CreatePickup [money] -
HardRock - 18.10.2013
PHP код:
if(!GetPlayerMoney(playerid) == 1000) return SendClientMessage(playerid, YOURCOLORHERE, "You do not have enough money to take this weapon.");
Re: CreatePickup [money] -
Aleksabre - 18.10.2013
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup_hp)
{
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -1000);
PlayerPlaySound(playerid,4203,0.0,0.0,0.0);
}
return 1;
I got like this, where do I add this:
pawn Код:
if(!GetPlayerMoney(playerid) == 1000) return SendClientMessage(playerid, YOURCOLORHERE, "You do not have enough money to take this weapon.");
?
Re: CreatePickup [money] -
HardRock - 18.10.2013
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup_hp)
{
if(!GetPlayerMoney(playerid) >= 1000) return SendClientMessage(playerid, YOURCOLORHERE, "You do not have enough money to take this weapon.");
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -1000);
PlayerPlaySound(playerid,4203,0.0,0.0,0.0);
}
return 1;
}
And i made little mistake, >= not ==. (Fixed)
Re: CreatePickup [money] -
Aleksabre - 18.10.2013
Thanks, one more question, how do I make, when the player gets killed, he drops everything, like a pickups, for health, sawnoff, deagle everything that he had, so when I pass their pickups, i get their weapons,health and others. Please help

Thanks.
Re: CreatePickup [money] -
Aleksabre - 18.10.2013
And by the way I get this warning
pawn Код:
warning 213: tag mismatch
on this:
pawn Код:
if(!GetPlayerMoney(playerid) >= 1000) return SendClientMessage(playerid, YOURCOLORHERE, "You do not have enough money to take this weapon.");
Why?
Of course I set "COLOR_WHITE" after SCM, but it's not that problem.
Re: CreatePickup [money] -
SilentSoul - 18.10.2013
Quote:
Originally Posted by Aleksabre
Thanks, one more question, how do I make, when the player gets killed, he drops everything, like a pickups, for health, sawnoff, deagle everything that he had, so when I pass their pickups, i get their weapons,health and others. Please help 
Thanks.
|
I'll give you example for that , it should be like that
Код:
public OnPlayerDeath
Use create hp pickup and use onplayerpickuppickup SetPlayerHealth(playerid,100);
I hope you understand me.
Re: CreatePickup [money] -
SilentSoul - 18.10.2013
Quote:
Originally Posted by Aleksabre
And by the way I get this warning
pawn Код:
warning 213: tag mismatch
on this:
pawn Код:
if(!GetPlayerMoney(playerid) >= 1000) return SendClientMessage(playerid, YOURCOLORHERE, "You do not have enough money to take this weapon.");
Why?
Of course I set "COLOR_WHITE" after SCM, but it's not that problem.
|
Suggestion to use GameText instead of SendClientMessage because it will spam out your chat use this
pawn Код:
if(GetPlayerMoney(playerid) < 1000) return GameTextForPlayer(playerid,"~r~You don't have enough money to buy hp",3000,5);