PDA

View Full Version : errors


Pranesh
24/09/2013, 12:57 PM
i was making a weapon hack checker

if(!strcmp(cmdtext,"/checkwep",true))
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an admin!");
if(GetPlayerWeaponData(playerid, 7, 36, ammo))
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 0, 1);
return 1;


but it gives error
error 035: argument type mismatch (argument 3)
help please
give a correct code if possible :)

Konstantinos
24/09/2013, 01:30 PM
GetPlayerWeaponData passes the weapon and ammo from each slot by reference.


new
weaponid,
ammo
;
GetPlayerWeaponData( playerid, 7, weaponid, ammo );
if( weaponid == 36 ) ResetPlayerWeapons( playerid );


Fist is by default, so no need to give it.