Raised This Month: $ Target: $400
 0% 

Error, need help.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-13-2013 , 13:31   Error, need help.
Reply With Quote #1

Ok, I've got this error in my server console:
Code:
L 02/13/2013 - 16:52:19: [FUN] Invalid player 1
L 02/13/2013 - 16:52:19: [AMXX] Displaying debug trace (plugin "VIP.amxx")
L 02/13/2013 - 16:52:19: [AMXX] Run time error 10: native error (native "give_item")
L 02/13/2013 - 16:52:19: [AMXX]    [0] VIP.sma::fwHamPlayerSpawnPost (line 334)
PHP Code:
public fwHamPlayerSpawnPost(id
{
    
VIPMenuUsed=0//Makes sure that VIP can use VIP menu
    
if( g_bCurrentMapIsInList 
    {
        return;
    }
    if(
get_user_flags(id) & ADMIN_LEVEL_H//Checks if player has flag H
    
{
        
give_item(id"weapon_hegrenade");
        
give_item(id"weapon_flashbang");
        
give_item(id"weapon_flashbang");
        
give_item(id"weapon_smokegrenade");
        
give_item(id"item_assaultsuit");
        if(
g_bHasBombSite && cs_get_user_team(id) == CS_TEAM_CT//Checks if map has bombsite and if VIP is CT
        
{
            
cs_set_user_defuse(id1); //Gives player defuser kit
        
}
    }

Unkolix is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 02-13-2013 , 13:57   Re: Error, need help.
Reply With Quote #2

You forgot
PHP Code:
if( is_user_aliveid ) ) 
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-13-2013 , 14:05   Re: Error, need help.
Reply With Quote #3

Quote:
Originally Posted by wickedd View Post
You forgot
PHP Code:
if( is_user_aliveid ) ) 
Is it possible to spawn dead? Could you explain why this error occurred?

P.S. The error seems to be gone.

Last edited by Unkolix; 02-13-2013 at 14:08.
Unkolix is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 02-13-2013 , 14:12   Re: Error, need help.
Reply With Quote #4

Quote:
Originally Posted by Unkolix View Post
Is it possible to spawn dead? Could you explain why this error occurred?

P.S. The error seems to be gone.
Read this.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 02-13-2013 , 14:24   Re: Error, need help.
Reply With Quote #5

The bast way to spawn a dead player is to use the Ham-Sandwich version (Fakemeta version is only for entity's):
PHP Code:
#include <amxmodx>
#include <hamsandwich>

<...>

public 
somefunction(client){
    if (!
is_user_alive(client) && is_user_connected(client)) 
        
ExecuteHam(Ham_CS_RoundRespawn,client);

__________________

Last edited by simanovich; 02-13-2013 at 14:25.
simanovich is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-13-2013 , 14:31   Re: Error, need help.
Reply With Quote #6

Ok, thanks for answers!
Unkolix is offline
Reply



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:35.


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