Raised This Month: $ Target: $400
 0% 

Nothing appens after for(){}...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
niubert
Junior Member
Join Date: Jul 2009
Location: France
Old 08-17-2009 , 14:14   Nothing appens after for(){}...
#1

Hy all.

I need your help to solve my problem. First excuse my english syntax, I'm french.


I have a bug, I use for{ in my script 3 or 4 times, and after the for(...){...} nothing appens. I tryed a search but I found nothing.

This is a code example :

PHP Code:
public Event_Player_Spawn(Handle:event, const String:name[], bool:dontBroadcast){
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
    
n_CountPlayer();
    
    
//PrintToChat do not appen
    
PrintToChat(client"Nombre de joueurs : %i"n_playerCount);

PHP Code:
n_PlayerCount(){
    
n_playerCount 0;
    
    for(new 
1<= n_playerMaxi++)
    {
        if(
IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(i))
        {
            
n_playerCount++;
        }
    }

n_CountPlayer works perfect, and I must count them at player spawn, if I want execute code after the counting in a round_start event ! :/

Thx for your help !

Last edited by niubert; 08-17-2009 at 14:23.
niubert is offline
 


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 15:13.


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