AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Nothing appens after for(){}... (https://forums.alliedmods.net/showthread.php?t=100740)

niubert 08-17-2009 14:14

Nothing appens after for(){}...
 
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 !

Exolent[jNr] 08-17-2009 14:44

Re: Nothing appens after for(){}...
 
You need to post in the SourceMod section.


All times are GMT -4. The time now is 15:13.

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