21.02.2015, 13:19
Hi guys, I have a problem with this Weapon Anti-Hack: https://sampforum.blast.hk/showthread.php?tid=123887
I integrated in my gamemode but /givegun dosen't work
GivePlayerGun(target, gun, gloante); <--- This line is the problem, (if i try to give a jetpack,works)
If i type /givegun 0 24 999 (exemple) i recive: Unknown Command
Sorry for bad english
I integrated in my gamemode but /givegun dosen't work
Код:
CMD:givegun(playerid, params[])
{
new gun,target,gloante;
if(PlayerInfo[playerid][pAdminLevel] < 4) return FaraAcces;
if(sscanf(params, "udd", target, gun ,gloante)) return SendClientMessage(playerid, -1, "{C0C0C0}Folosire {FFFFFF}/givegun <playerid> <gun> <gloante>");
if(gun < 1 || gun > 47) return SendClientMessage(playerid, COLOR_GREY, "Armele au ID cuprinse intre 1-47.");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat!");
if(gun == 21 && PlayerInfo[target][pAdminLevel] == 0) return SendClientMessage(playerid,-1,"Nu poti da JetPack la un Player");
if(gun == 21)
{
SetPlayerSpecialAction(target,SPECIAL_ACTION_USEJETPACK);
}
if(gun != 21)
{
GivePlayerGun(target, gun, gloante);
new adminame[MAX_PLAYER_NAME+1], string1[128+MAX_PLAYER_NAME+1],playername[MAX_PLAYER_NAME+1], string2[128+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, adminame, sizeof(adminame));
GetPlayerName(target, playername, sizeof(playername));
format(string1, sizeof(string1), "[Admin] {FFFFFF}Iai dat playerului {F81414}%s {00FFFF}(ID %d) {FFFFFF}arma ID %d cu %d gloante.",playername,target,gun,gloante);
SendClientMessage(playerid, 0xC0C0C0AA, string1);
format(string2, sizeof(string2), "[Admin] {FFFFFF}Ai primit {F81414}Arma {FFFFFF}ID %d cu %d gloante de la Admin {F81414}%s",gun,gloante,adminame);
SendClientMessage(target, 0xC0C0C0AA, string2);
}
return 1;
}
If i type /givegun 0 24 999 (exemple) i recive: Unknown Command
Sorry for bad english

