View Single Post
Pach
Senior Member
Join Date: Feb 2009
Location: Russian Federation
Old 08-09-2009 , 02:42   Re: [ZP] Extra Item: Sawn-Off Shotgun v0.2
Reply With Quote #17

Quote:
Originally Posted by Exolent[jNr] View Post
That's not the problem.
The problem is the code:

PHP Code:
public fw_Touch(entitytoucher)
{
    
// Entity is not valid
    
if(!pev_valid(entity))
        return 
FMRES_IGNORED;
        
    
// Get model, toucher classname, and entity classname
    
new model[33], toucherclass[33], entityclass[33]
    
pev(entitypev_modelmodelcharsmax(model))
    
pev(entitypev_classnameentityclasscharsmax(entityclass))
    
pev(toucherpev_classnametoucherclasscharsmax(toucherclass))
    
    if(!
equali(toucherclass"player") || !equali(entityclass"weaponbox"))
        return 
FMRES_IGNORED;
        
    if(
equali(modelsawnoff_model_w))
        if(
allowed_touch(toucher))
            
g_sawnoff_shotgun[toucher] = true;
    
    return 
FMRES_IGNORED;

Line 218:
PHP Code:
pev(toucherpev_classnametoucherclasscharsmax(toucherclass)) 
Should be:
PHP Code:
public fw_Touch(entitytoucher)
{
    
// Entity is not valid
    
if(!pev_valid(entity) || !pev_valid(toucher))
        return 
FMRES_IGNORED;
        
    
// Get model, toucher classname, and entity classname
    
new model[33], toucherclass[33], entityclass[33]
    
pev(entitypev_modelmodelcharsmax(model))
    
pev(entitypev_classnameentityclasscharsmax(entityclass))
    
pev(toucherpev_classnametoucherclasscharsmax(toucherclass))
    
    if(!
equali(toucherclass"player") || !equali(entityclass"weaponbox"))
        return 
FMRES_IGNORED;
        
    if(
equali(modelsawnoff_model_w))
        if(
allowed_touch(toucher))
            
g_sawnoff_shotgun[toucher] = true;
    
    return 
FMRES_IGNORED;

Thank you! I would test!
__________________
Sorry for my bad English.
Pach is offline
Send a message via ICQ to Pach Send a message via Skype™ to Pach