15.03.2018, 16:12
I know why my pawno crashed, but what's the way to do it then?
This specific piece of code makes it crash.
:
Код:
stock SellGun(playerid, price, weaponid, ammo) {
new
gPlayerMoney = GetPlayerMoney(playerid);
if(gPlayerMoney > price) {
new
String[80],
WeaponName[32];
GivePlayerMoney(playerid, -price);
GivePlayerWeapon(playerid, weaponid, ammo);
GetWeaponName(weaponid, WeaponName, sizeof (WeaponName));
format(String, sizeof(String),
"SERVER: You have bought %s(Ammo: %i) for $%i), WeaponName, ammo, price);
return SendClientMessage(playerid, -1, String);
}
else return format(String, sizeof(String),
"You don't have enough money to buy %s (Money Required: $%i), WeaponName, price);
SendClientMessage(playerid, -1, String);
}
:
Код:
else return format(String, sizeof(String), "You don't have enough money to buy %s (Money Required: $%i), WeaponName, price); SendClientMessage(playerid, -1, String);

