errors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: errors (
/showthread.php?tid=465824)
errors -
Pranesh - 24.09.2013
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
Re: errors -
Konstantinos - 24.09.2013
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.