23.02.2010, 16:31
what are the lines 781 and 782
nvm, found it
strlen and IsNumeric are functions for strings and Weapon is an integer
You don't need this
sscanf has its inbuilt error check to see if the string typed by the player can be deformated to fit the variables added as the third argument
Should be
because valid weapon ids are between 0 and 46
https://sampwiki.blast.hk/wiki/Weapons
nvm, found it
pawn Код:
if(!strlen(Weapon)) return SendClientMessage(playerid, AdministrationError, "USAGE: /weapon [PlayerID] [WeaponID]");
if(!IsNumeric(Weapon)) return SendClientMessage(playerid, AdministrationError, "Error: Invalid WeaponID");
You don't need this
pawn Код:
if(!strlen(Weapon)) return SendClientMessage(playerid, AdministrationError, "USAGE: /weapon [PlayerID] [WeaponID]");
pawn Код:
if(!IsNumeric(Weapon)) return SendClientMessage(playerid, AdministrationError, "Error: Invalid WeaponID");
pawn Код:
if(Weapon < 0 || Weapon > 46)return SendClientMessage(playerid, AdministrationError, "Error: Invalid WeaponID");
https://sampwiki.blast.hk/wiki/Weapons