02.09.2010, 01:44
Add these into your script -
Abit messy, but i'm tired so clean it up abit.. also it's not tested so just let me know.
pawn Код:
stock GetPlayerCash(playerid)
{
return Cash[playerid];
}
stock GivePlayerCash(playerid, money)
{
Cash[playerid]+=money;
SetPlayerMoney(playerid,Cash[playerid]);
return 1;
}
pawn Код:
if(strcmp(cmd, "/weaponspack", true) == 0) {
if(PlayerConnected(playerid))
{
if(GetPlayerCash(playerid) >= 1000000) // Checks if the player has it.
{
GivePlayerCash(playerid,-1000000); // Takes it away.
GivePlayerWeapon(playerid, 24, 650);
GivePlayerWeapon(playerid, 31, 650);
GivePlayerWeapon(playerid, 26, 650);
SetPlayerHealth(playerid, 100);
SetPlayerArmor(playerid, 100);
{
else
}
SendClientMessage(playerid, *COLOR*, "You do not have the right ammount of cash for these items!");
}
return 1;
}