AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Looping (https://forums.alliedmods.net/showthread.php?t=130651)

shuttle_wave 06-26-2010 03:22

Looping
 
How would i loop a players name from 1 function to another? but u please give me example

Xellath 06-26-2010 03:32

Re: Looping
 
You could store it in a global variable.

grimvh2 06-26-2010 06:10

Re: Looping
 
Or just like this :

PHP Code:

public urfunction(id)
{
    new 
name[32]
    
get_user_name(idname31)
    
    
printname(name)
}

public 
printname(name[])
{
    
client_print(0print_chat"%s"name)



Devil259 06-26-2010 06:32

Re: Looping
 
Quote:

Originally Posted by grimvh2 (Post 1220251)
Or just like this :

PHP Code:

public function(id)
{
    new 
name[32]
    
get_user_name(idname31)
 
    
printname(name)
}
 
public 
printname(name[])
{
    
client_print(0print_chat"%s"name)



You can't use it ?

Code:
public function(id) {     new name[32]     get_user_name(id, name, 31)       client_print(0, print_chat, "%s", name) }

grimvh2 06-26-2010 06:39

Re: Looping
 
Devil, m just giving an example. I don't know what he really wants to do.

Devil259 06-26-2010 06:42

Re: Looping
 
Ok...

shuttle_wave 06-26-2010 07:32

Re: Looping
 
Ok Thanks.


All times are GMT -4. The time now is 14:46.

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