[HELP]actor's name
Posted: Fri Jun 03, 2011 4:21 am
hello i need to make what a sound take the name of a actor for play the sound but i can't do it.
Example:
actor's name is "player"
the function for sound will be:
but how make what in place of actor's name are a variable with the valor "player"
i tried this but give error:
I wait what you understand my english bad..
chaoooooooooooo
Example:
actor's name is "player"
the function for sound will be:
- Code: Select all
PlaySound2("data/player.wav", 1.000000, 1, 0.000000);
but how make what in place of actor's name are a variable with the valor "player"
i tried this but give error:
- Code: Select all
char actorname[32];
char sounds[32];
getclone(actorname);
sprintf(sounds, "/data/%d.wav",actorname);
PlaySound2("sounds", 1.000000, 1, 0.000000);
I wait what you understand my english bad..
chaoooooooooooo