16.02.2014, 22:39
Put this arrary of all weapon names in your script:
I'm guessing you're saving the weapon ID in this variable:
Here is an example of how you can format the string:
pawn Код:
new aWeaponNames[][32] =
{
{"Unarmed"}, {"BrassKnuckles"}, {"GolfClub"}, {"NightStick"}, {"Knife"}, {"BaseballBat"},
{"Shovel"}, {"PoolCue"}, {"Katana"}, {"Chainsaw"}, {"PurpleDildo"}, {"BigWhiteVibrator"},
{"MedWhiteVibrator"}, {"SmlWhiteVibrator"}, {"Flowers"}, {"Cane"}, {"Grenade"}, {"Teargas"},
{"Molotov"}, {"Empty Slot 1"}, {"Empty Slot 2"}, {"Empty Slot 3"}, {"Colt45"}, {"SDPistol"},
{"DesertEagle"}, {"Shotgun"}, {"SawnoffShotgun"}, {"Spas12"}, {"Mac10"},
{"MP5"}, {"AK47"}, {"M4"}, {"Tec9"}, {"CountryRifle"}, {"Sniper"}, {"RPG"},
{"HeatRPG"}, {"Flamethrower"}, {"Minigun"}, {"Satchel"}, {"Detonator"},
{"SprayCan"}, {"Extinguisher"}, {"Camera"}, {"NVGoggles"}, {"IRGoggles"},
{"Parachute"}, {"Fake Pistol"}
};
pawn Код:
iTrunk[vehicleid][tWeapon1]
pawn Код:
format(string, sizeof(string), "Slot 1: %s", aWeaponNames[ iTrunk[vehicleid][tWeapon1] ]);