AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   i need help with public~ (https://forums.alliedmods.net/showthread.php?t=55394)

lucky109 05-20-2007 23:52

i need help with public~
 
Code:

public go()
{
going(test);
}

public going(test)
{
new pname[32];
get_user_name(target,pname,31);
client_print(0, print_chat, "%s", pname)
}

i have save a value to "test" (the value is player index)
i want show pname to admin only....how i can do this?

i have to try...than error undefined symbol "id"
Code:

public going(test)
{
new pname[32];
get_user_name(target,pname,31);
if (get_user_flags(id)&ADMIN_LEVEL_H)
{
client_print(id, print_chat, "%s", pname)
}
}


regalis 05-21-2007 05:19

Re: i need help with public~
 
You have to change "id" into "test" because like you said, test contain the player index) ;)


All times are GMT -4. The time now is 10:40.

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