errors
#1

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
Reply
#2

GetPlayerWeaponData passes the weapon and ammo from each slot by reference.

pawn Код:
new
    weaponid,
    ammo
;
GetPlayerWeaponData( playerid, 7, weaponid, ammo );
if( weaponid == 36 ) ResetPlayerWeapons( playerid );
Fist is by default, so no need to give it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)