Raised This Month: $12 Target: $400
 3% 

[DELETED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shadowless
Member
Join Date: May 2018
Old 08-10-2018 , 07:54   [DELETED]
Reply With Quote #1

---

Last edited by Shadowless; 05-19-2019 at 06:07.
Shadowless is offline
Send a message via ICQ to Shadowless
Old 08-10-2018, 15:45
Shadowless
This message has been deleted by Shadowless.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-10-2018 , 16:11   Re: [help] golden m4
Reply With Quote #2

#include engine
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 08-10-2018, 16:27
Shadowless
This message has been deleted by Shadowless.
Old 08-10-2018, 16:42
Shadowless
This message has been deleted by Shadowless.
Old 08-12-2018, 08:00
Shadowless
This message has been deleted by Shadowless.
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 08-14-2018 , 03:07   Re: [help] golden m4
Reply With Quote #3

Code:
public fw_SetModel(entity, model[])
{
    if(!is_valid_ent(entity)) 
        return FMRES_IGNORED

    if(!g_HasM4[id])
        return FMRES_IGNORED

    if(!equali(model, OLD_M4_W_MODEL)) 
        return FMRES_IGNORED

    new className[33]
    entity_get_string(entity, EV_SZ_classname, className, 32)
    
    if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
    {
        engfunc(EngFunc_SetModel, entity, M4_W_MODEL)
        return FMRES_SUPERCEDE
    }
    return FMRES_IGNORED
}
Need to check if the owner have M4 Gold first
__________________
My plugin:

Last edited by Celena Luna; 08-14-2018 at 03:07.
Celena Luna is offline
Old 08-15-2018, 13:23
Shadowless
This message has been deleted by Shadowless.
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 08-15-2018 , 14:45   Re: [help] golden m4
Reply With Quote #4

Yes that won't work, part of code for W model is missing even if you detect PlayerIndex & g_HasM4 it wont still work, cause dropped weapon requires key. I would suggest my weapon mod.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 08-16-2018 , 05:54   Re: [help] golden m4
Reply With Quote #5

Quote:
Originally Posted by Shadowless View Post
//// GoldenM4a1.sma
// C:\Games\Counter-Strike_1.6\cstrike\addons\amxmodx\scripting\G oldenM4a1.sma(121) : error 017: undefined symbol "id"
//
// 1 Error.
// Could not locate output file compiled\GoldenM4a1.amx (compile failed).
//
// Compilation Time: 0,3 sec
// ----------------------------------------


line 121 = if(!g_HasM4[id])
Code:
public fw_SetModel(entity, model[])
{
    if(!is_valid_ent(entity)) 
        return FMRES_IGNORED

    static id; id = pev(entity, pev_owner)

    if(!g_HasM4[id])
        return FMRES_IGNORED

    if(!equali(model, OLD_M4_W_MODEL)) 
        return FMRES_IGNORED

    new className[33]
    entity_get_string(entity, EV_SZ_classname, className, 32)
    
    if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
    {
        engfunc(EngFunc_SetModel, entity, M4_W_MODEL)
        return FMRES_SUPERCEDE
    }
    return FMRES_IGNORED
}
Quote:
Originally Posted by Ghosted View Post
Yes that won't work, part of code for W model is missing even if you detect PlayerIndex & g_HasM4 it wont still work, cause dropped weapon requires key. I would suggest my weapon mod.
Who said it won't work?
__________________
My plugin:

Last edited by Celena Luna; 08-16-2018 at 05:57.
Celena Luna is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 08-16-2018 , 05:59   Re: [help] golden m4
Reply With Quote #6

Quote:
Originally Posted by Celena Luna View Post
Who said it won't work?
I haven't seen code fully, g_HasM4 should work but your code wont cause weaponbox has not owner
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 08-16-2018 at 05:59.
Ghosted is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 08-16-2018 , 06:10   Re: [help] golden m4
Reply With Quote #7

Quote:
Originally Posted by Ghosted View Post
I haven't seen code fully, g_HasM4 should work but your code wont cause weaponbox has not owner
PHP Code:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
// #include <xs>
// #include <sqlx>

#define PLUGIN  "Test Code"
#define VERSION "1.0"
#define AUTHOR  "Celena Luna"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_forward(FM_SetModel"fw_SetModel")
}

public 
fw_SetModel(entitymodel[])
{
    if(!
pev_valid(entity))
        return 
FMRES_IGNORED

    
static Classname[32]
    
pev(entitypev_classnameClassnamesizeof(Classname))

    if(!
equal(Classname"weaponbox"))
        return 
FMRES_IGNORED

    
static idname[32]
    
id pev(entitypev_owner)
    
get_user_name(idnamecharsmax(name))
    
client_print(idprint_console"Models: %s"model)
    
client_print(idprint_console"Owner: %i"id)
    
client_print(idprint_console"Owner: %s"name)

    return 
FMRES_IGNORED;



Is this enough?
__________________
My plugin:
Celena Luna is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 08-16-2018 , 06:22   Re: [help] golden m4
Reply With Quote #8

Omg, hows that, weaponbox with owner... nice ze map tho
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 08-16-2018 , 06:26   Re: [help] golden m4
Reply With Quote #9

Quote:
Originally Posted by Ghosted View Post
Omg, hows that, weaponbox with owner... nice ze map tho
I wrote CSO weapon to CS 1.6. Isn't that one of important thing when writing a weapon plugins?
plus this is known for long ago.
P/S: Skyline CSO map btw
__________________
My plugin:
Celena Luna is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 08-16-2018 , 06:29   Re: [help] golden m4
Reply With Quote #10

Quote:
Originally Posted by Celena Luna View Post
I wrote CSO weapon to CS 1.6.
O yea, i wrote weapon mod

Quote:
Originally Posted by Celena Luna View Post
P/S: Skyline CSO map btw
Y, i was playing in Nexon
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode