PDA

View Full Version : Looping


shuttle_wave
06-26-2010, 03:22
How would i loop a players name from 1 function to another? but u please give me example

Xellath
06-26-2010, 03:32
You could store it in a global variable.

grimvh2
06-26-2010, 06:10
Or just like this :


public urfunction(id)
{
new name[32]
get_user_name(id, name, 31)

printname(name)
}

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

Devil259
06-26-2010, 06:32
Or just like this :


public function(id)
{
new name[32]
get_user_name(id, name, 31)

printname(name)
}

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


You can't use it ?


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
Devil, m just giving an example. I don't know what he really wants to do.

Devil259
06-26-2010, 06:42
Ok...

shuttle_wave
06-26-2010, 07:32
Ok Thanks.