06.05.2013, 17:12
Quote:
Hello,
I've been asked to post this on here, Other people that can't get the Kickgun working. This is the main script, that kicks "damageid" when you shoot them with the kickgun. Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) { if(GetPlayerWeapon(playerid) == 33 && kickgun[playerid] == 1) { SendClientMessage(damagedid,COLOR_RED, "You have been kicked by The Quake Industries Shotgun for AFK."); Kick(damagedid); } return 1; } Код:
if(strcmp(cmd, "/kickgun", true) ==0) { if(PlayerInfo[playerid][pAdmin] >= 1337) { if(kickgun[playerid] == 0) { if(PlayerInfo[playerid][pKGBullets] != 0) { SafeGivePlayerWeapon(playerid, 33, 10000); SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1000); kickgun[playerid] = 1; format(string, sizeof(string), "* %s Takes out his kickgun.", sendername); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); } else { SendClientMessage(playerid, COLOR_GREY,"* No charges in the kickgun!"); return 1; } } else { ResetPlayerWeapons(playerid); SafeGivePlayerWeapon(playerid, 24, 10); AttachWeaponCorrectly(playerid, 23); kickgun[playerid] = 0; ClearAnimations(playerid); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, PlayerInfo[playerid][pSilenSkill]); format(string, sizeof(string), "* %s Puts his kickgun away.", sendername); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); } } return 1; } |
So to fix a few errors:
Firstly, you haven't referenced kickgun nor KGBullets.
SetPlayerSkillLevel wouldn't even be required as it was specific to our game mode
I would go on, however I rather just post the new version I created since the only thing you changed was the weapon that you received when using the command and the Quake industry stuff.
So yeah, I'll repost the my version as either an include or a filsterscript either today or tomorrow.