Command help
#1

The command is withdrawing a weapon from your inventory. The weapon withdraws just fine, but when it should say what I withdrew, it just comes out with, "[Name here] pulls out a ." I can't seem to see what wrong with it.

pawn Код:
new weapon, weapon_name[20];
GivePlayerWeapon(playerid, Player[playerid][Weapon1], Player[playerid][Weapon1a]);
WeaponOut[playerid] = 1;
weapon = GetPlayerWeapon(playerid);
if(weapon == 2) weapon_name = "Golf Club";
if(weapon == 3) weapon_name = "Nite Stick";
if(weapon == 4) weapon_name = "Knife";
if(weapon == 5) weapon_name = "Baseball Bat";
if(weapon == 6) weapon_name = "Shovel";
if(weapon == 7) weapon_name = "Pool Stick";
if(weapon == 8) weapon_name = "Katana";
format(string, sizeof(string), "%s pulls out a %s.", GetName(playerid), weapon_name);
SetPlayerChatBubble(playerid, string, COLOR_LIGHTPURPLE, 10, 7000);
SendClientMessage(playerid, COLOR_LIGHTPURPLE, string);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)