AlliedModders

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

padilha007 08-04-2008 22:21

Help With CODE
 
I need to get a name of player, if name = "[Xiter]nameofplayer" then i use my code.


PHP Code:

    static name[32]
    
get_user_name(idname31)
    if (
get_user_name(id) = "[Xiter]%s" name) {
    
// My code
    


in compiler say: Undefined symbol "name", anyone can help?

YamiKaitou 08-04-2008 22:51

Re: Help With CODE
 
As per the Global Forum Rules, you need to have a descriptive topic. If you wish for this topic to stay open, please correct the topic title before you post again.

Emp` 08-04-2008 23:25

Re: Help With CODE
 
Code:

if( equal( name, "[Xiter]", 7) ){

Xanimos 08-05-2008 08:38

Re: Help With CODE
 
Emp`, he needs to know more than that, he doesn't know how to get a players name....
Code:
new name[32]; get_user_name( id , name , 31 ); if( equal( name , "[Xiter]" , 7 ) ) {     //OMG its a Xiter }

Emp` 08-06-2008 02:42

Re: Help With CODE
 
Quote:

Originally Posted by Xanimos (Post 664952)
Emp`, he needs to know more than that, he doesn't know how to get a players name....
Code:
new name[32]; get_user_name( id , name , 31 ); if( equal( name , "[Xiter]" , 7 ) ) {     //OMG its a Xiter }

he had the code to get players name in main post....

Xanimos 08-07-2008 11:36

Re: Help With CODE
 
Quote:

Originally Posted by Emp` (Post 665326)
he had the code to get players name in main post....

Yes, but he also had
Code:
 if (get_user_name(id) = "[Xiter]%s" , name) {     // My code     }

Which shows he really doesn't know what he's doing.

padilha007 08-07-2008 12:15

Re: Help With CODE
 
i'm have no idea what i'm doing, but now i know tnx all


All times are GMT -4. The time now is 05:31.

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