It is currently 16 Dec 2018 19:25






Reply to topic  [ 3 posts ] 
 Problema plugin 
Author Message
Membru, skill 0
Membru, skill 0

Joined: 22 Apr 2016 12:38
Posts: 91
Detinator Steam: Da
CS Status: *_*
Detinator server CS: Da
Fond eXtream: 0
Salut. Stie cineva de ce imi da eroarea asta:
| Afiseaza codul
[AMXX] Run time error 10: native error (native "cs_set_user_bpammo")
L 03/13/2018 - 22:48:35: [AMXX] [0] 55b80t0w.sma.p::AntiFurienItem (line 63)
la plugin-ul asta:
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

/*
Credits:

The YONTU - Code Optimized
scosmynnnn - Ideea pentru a trimite un task 0.1 la Spawn
*/

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#include <fakemeta_util>

new const PLUGIN[] = "Furien: Anti-Furien Weapons Menu";
new const VERSION[] = "1.3";

#pragma semicolon 1

new bool: HaveChoosenWeap[33];

public plugin_init()
{
register_plugin(PLUGIN, VERSION, "Adventx && Snow.");

register_clcmd("say /weapons","SayWeapons");
register_clcmd("say /guns","SayWeapons");
register_clcmd("say_team /weapons","SayWeapons");
register_clcmd("say_team /guns","SayWeapons");

RegisterHam(Ham_Spawn, "player", "hamPlayerSpawnPost", 1);
}

public hamPlayerSpawnPost(id)
{
if(is_user_alive(id) && get_user_team(id) == 1)
{
set_task(0.1, "FurienItem",id);
}

if(is_user_alive(id) && get_user_team(id) == 2)
{
ShowMenuWeap(id);
HaveChoosenWeap[id] = false;
set_task(0.1, "AntiFurienItem",id);
}
}

public FurienItem(id)
{
fm_give_item(id, "weapon_knife");
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_flashbang");
}

public AntiFurienItem(id)
{
fm_give_item(id, "weapon_knife");
fm_give_item(id, "weapon_deagle");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_smokegrenade");
cs_set_user_bpammo(id, CSW_DEAGLE,250);
}

public ShowMenuWeap(id)
{
new szMenu = menu_create("\rAnti Furien \yWeapons","AntiFurienWeap");

menu_additem(szMenu, "M4A1","1");
menu_additem(szMenu, "AK47","2");
menu_additem(szMenu, "M3","3");
menu_additem(szMenu, "FAMAS","4");
menu_additem(szMenu, "Galil","5");
menu_additem(szMenu, "MP5Navy","6");
menu_additem(szMenu, "P90","7");

menu_setprop(szMenu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, szMenu, 0);

return PLUGIN_HANDLED;
}

public AntiFurienWeap(id, szMenu, item)
{
if(item == MENU_EXIT)
return PLUGIN_HANDLED;

if(get_user_team(id) != 2)
return PLUGIN_HANDLED;

new data [7], szName [64];
new access, callback;
menu_item_getinfo (szMenu, item, access, data,charsmax (data), szName,charsmax (szName), callback);
new key = str_to_num (data);

switch (key)
{
case 1:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1,250);
}
case 2:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_ak47");
cs_set_user_bpammo(id, CSW_AK47,250);
}
case 3:
{

HaveChoosenWeap[id] = true;
give_item(id, "weapon_m3");
cs_set_user_bpammo(id, CSW_M3,250);
}
case 4:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_famas");
cs_set_user_bpammo(id, CSW_FAMAS,250);
}
case 5:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_galil");
cs_set_user_bpammo(id, CSW_GALIL,250);
}
case 6:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_mp5navy");
cs_set_user_bpammo(id, CSW_MP5NAVY,250);
}
case 7:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_p90");
cs_set_user_bpammo(id, CSW_P90,250);
}
}

menu_destroy(szMenu);
return PLUGIN_HANDLED;
}

public SayWeapons(id)
{
if(get_user_team(id) == 2)
{
if(!is_user_alive(id))
{
ChatColor(id, "!g[AntiFurien Weapons] !nNu iti poti alege armele cand esti mort!");
return;
}

if(HaveChoosenWeap[id]==true)
{
ChatColor(id, "!g[AntiFurien Weapons] !nAi selectat deja o arma runda aceasta");
return;
}

else
{
ShowMenuWeap(id);
}
}
}

stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);

replace_all(msg, 190, "!g", "^4"); // Green Color
replace_all(msg, 190, "!n", "^1"); // Default Color
replace_all(msg, 190, "!t", "^3"); // Team Color
replace_all(msg, 190, "!t2", "^0"); // Team2 Color

if (id) players[0] = id; else get_players(players, count, "ch"); {
for (new i = 0; i < count; i++) {
if (is_user_connected(players[i])) {
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/


Last edited by Laurentiu P. on 19 Mar 2018 19:00, edited 1 time in total.

Topicurile nu se inchid.



14 Mar 2018 01:33
Profile multumesc WWW
Online
Jan Darmu'
Jan Darmu'
User avatar

Joined: 25 Aug 2014 20:31
Posts: 6095
Location: Ploiesti
Detinator Steam: Da
CS Status: All i ever wanted was a Roley Roley
SteamID: Jandarmeria
Reputatie: Fost Membru Club eXtreamCS ( o luna )
Fost Moderator ajutator
Fost Super Moderator
eXtream Mod
Fost Intermediar
Nume anterior : Christmas,
A k c 3 n 7
Fond eXtream: 0
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

/*
Credits:

The YONTU - Code Optimized
scosmynnnn - Ideea pentru a trimite un task 0.1 la Spawn
*/

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#include <fakemeta_util>

new const PLUGIN[] = "Furien: Anti-Furien Weapons Menu";
new const VERSION[] = "1.3";

#pragma semicolon 1

new bool: HaveChoosenWeap[33];

public plugin_init()
{
register_plugin(PLUGIN, VERSION, "Adventx && Snow.");

register_clcmd("say /weapons","SayWeapons");
register_clcmd("say /guns","SayWeapons");
register_clcmd("say_team /weapons","SayWeapons");
register_clcmd("say_team /guns","SayWeapons");

RegisterHam(Ham_Spawn, "player", "hamPlayerSpawnPost", 1);
}

public hamPlayerSpawnPost(id)
{
if(is_user_alive(id) && get_user_team(id) == 1)
{
set_task(0.1, "FurienItem",id);
}

if(is_user_alive(id) && get_user_team(id) == 2)
{
ShowMenuWeap(id);
HaveChoosenWeap[id] = false;
set_task(0.1, "AntiFurienItem",id);
}
}

public FurienItem(id)
{
fm_give_item(id, "weapon_knife");
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_flashbang");
}

public AntiFurienItem(id)
{
if( is_user_alive( id ) ) {

fm_give_item(id, "weapon_knife");
fm_give_item(id, "weapon_deagle");
fm_give_item(id, "weapon_flashbang");
fm_give_item(id, "weapon_smokegrenade");
cs_set_user_bpammo(id, CSW_DEAGLE,250);
}
}

public ShowMenuWeap(id)
{
new szMenu = menu_create("\rAnti Furien \yWeapons","AntiFurienWeap");

menu_additem(szMenu, "M4A1","1");
menu_additem(szMenu, "AK47","2");
menu_additem(szMenu, "M3","3");
menu_additem(szMenu, "FAMAS","4");
menu_additem(szMenu, "Galil","5");
menu_additem(szMenu, "MP5Navy","6");
menu_additem(szMenu, "P90","7");

menu_setprop(szMenu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, szMenu, 0);

return PLUGIN_HANDLED;
}

public AntiFurienWeap(id, szMenu, item)
{
if(item == MENU_EXIT)
return PLUGIN_HANDLED;

if(get_user_team(id) != 2)
return PLUGIN_HANDLED;

new data [7], szName [64];
new access, callback;
menu_item_getinfo (szMenu, item, access, data,charsmax (data), szName,charsmax (szName), callback);
new key = str_to_num (data);

switch (key)
{
case 1:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1,250);
}
case 2:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_ak47");
cs_set_user_bpammo(id, CSW_AK47,250);
}
case 3:
{

HaveChoosenWeap[id] = true;
give_item(id, "weapon_m3");
cs_set_user_bpammo(id, CSW_M3,250);
}
case 4:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_famas");
cs_set_user_bpammo(id, CSW_FAMAS,250);
}
case 5:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_galil");
cs_set_user_bpammo(id, CSW_GALIL,250);
}
case 6:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_mp5navy");
cs_set_user_bpammo(id, CSW_MP5NAVY,250);
}
case 7:
{
HaveChoosenWeap[id] = true;
give_item(id, "weapon_p90");
cs_set_user_bpammo(id, CSW_P90,250);
}
}

menu_destroy(szMenu);
return PLUGIN_HANDLED;
}

public SayWeapons(id)
{
if(get_user_team(id) == 2)
{
if(!is_user_alive(id))
{
ChatColor(id, "!g[AntiFurien Weapons] !nNu iti poti alege armele cand esti mort!");
return;
}

if(HaveChoosenWeap[id]==true)
{
ChatColor(id, "!g[AntiFurien Weapons] !nAi selectat deja o arma runda aceasta");
return;
}

else
{
ShowMenuWeap(id);
}
}
}

stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);

replace_all(msg, 190, "!g", "^4"); // Green Color
replace_all(msg, 190, "!n", "^1"); // Default Color
replace_all(msg, 190, "!t", "^3"); // Team Color
replace_all(msg, 190, "!t2", "^0"); // Team2 Color

if (id) players[0] = id; else get_players(players, count, "ch"); {
for (new i = 0; i < count; i++) {
if (is_user_connected(players[i])) {
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/

_________________
ImageImage

Lista intermediari
Nu ezita sa ma contactezi la 112 pentru interventii speciale: S.I.A.S
REGULI GENERALE
REGULILE SECTIUNII ANUNTURI



14 Mar 2018 01:44
Profile multumesc
Membru, skill 0
Membru, skill 0

Joined: 22 Apr 2016 12:38
Posts: 91
Detinator Steam: Da
CS Status: *_*
Detinator server CS: Da
Fond eXtream: 0
Nu mai apare acea eroare..multumesc :D


17 Mar 2018 07:33
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 42 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group