21.10.2009, 15:49
Aight.
Im trying to create a /holster and /unholster command. Iґve got this code:
While on top
But I get some cool error..
error 017: undefined symbol "wid"
Why?
Im trying to create a /holster and /unholster command. Iґve got this code:
Код:
if(strcmp(cmd, "/holster", true) == 0) { new wid; new wammo; wid = GetPlayerWeapon(playerid); wammo = GetPlayerAmmo(playerid); if((wid >= 1 ) && (wid <= 38)) { SetHolderWeapon(playerid,wid); RemovePlayerWeapon(playerid,wid); SendClientMessage(playerid,GREEN,"You holstered your weapon. To unholster it, use /unholster."); HolsterUsed[playerid] = 1; HolsterWeapon[playerid] = wid; HolsterAmmo[playerid] = wammo; return 1; } else { SendClientMessage(playerid,RED,"You are not holding any weapon to holster."); } } if(strcmp(cmd, "/unholster", true) == 0) { if(HolsterUsed[playerid] > 0) { RemoveHolderWeapon(playerid); GivePlayerWeapon(playerid,wid,wammo); SendClientMessage(playerid,GREEN,"You unholstered your gun."); HolsterUsed[playerid] = 0; HolsterWeapon[playerid] = 0; HolsterAmmo[playerid] = 0; return 1; } else { SendClientMessage(playerid,RED,"You havent got any weapon holstered."); } }
Код:
new HolsterUsed[MAX_PLAYERS]; new HolsterWeapon[MAX_PLAYERS]; new HolsterAmmo[MAX_PLAYERS];
error 017: undefined symbol "wid"
Why?