22.07.2012, 07:07
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.
This is the actual kickgun script, I just put this below some other command, using strcmp.
Hope you like.
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; }