Raised This Month: $ Target: $400
 0% 

[Other clinet not in game] error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PriceLess
Senior Member
Join Date: Sep 2012
Location: Jungle
Old 03-01-2013 , 19:47   [Other clinet not in game] error
Reply With Quote #1

I got this error where it says the second guy is not ingame, and it wont spawn the smokegrenade for some reason. First it is going to give you smokegrenade on "action" started by a command, and second it's going to give on the detonate event. does not happen for some reason. any ideas?

as I said the "smokewar" is started by a command.

PHP Code:
        if(StrEqual(item"6"))
        {
            
SmokeWar(client);
        }

SmokeWar(client)
{
    
CPrintToChat(client"{lime}[Warden]{blue} Smoke war har startet");
    for(new 
1GetMaxClients(); i++)
    {
        
CPrintToChatAll("{lime}[Warden]{blue}Har startet smoke war");
        
SetEntProp(iProp_Data"m_iHealth"1);
        
GivePlayerItem(i"smokegrenade");
    }
    
Day 6;
}

public 
Action:Smoke(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if(
Day == 6)
    {
        
GivePlayerItem(client"smokegrenade");
        
SetEntProp(clientProp_Data"m_iHealth"1);
    }

*edit*Does it require to be two people in the game?

L 03/02/2013 - 01:42:24: [SM] Native "SetEntProp" reported: Entity 2 (2) is invalid
L 03/02/2013 - 017:54: [SM] Native "GivePlayerItem" reported: Client 2 is not in game
__________________
sincerely PriceLess

Last edited by PriceLess; 03-01-2013 at 19:48. Reason: *Edit*
PriceLess is offline
Bimbo1
Senior Member
Join Date: Jan 2010
Location: brazil
Old 03-01-2013 , 21:40   Re: [Other clinet not in game] error
Reply With Quote #2

just setentprop for m_iHealth if Isclientconnected && Isclientingame.
__________________
sie sind das essen und wir sind die jäger!
Bimbo1 is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 03-01-2013 , 21:44   Re: [Other clinet not in game] error
Reply With Quote #3

Also, change:
PHP Code:
for(new 1GetMaxClients(); i++) 
to:
PHP Code:
for(new 1<= MaxClientsi++) 
__________________
11530 is offline
PriceLess
Senior Member
Join Date: Sep 2012
Location: Jungle
Old 03-01-2013 , 21:52   Re: [Other clinet not in game] error
Reply With Quote #4

obviously, yeah. thanks, hehe.
__________________
sincerely PriceLess
PriceLess is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 03-01-2013 , 22:49   Re: [Other clinet not in game] error
Reply With Quote #5

I would point out though, that your other thread has only partially made the above correction. At least twice there, so check the rest of the plugin too.
__________________
11530 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 05:45.


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