23.11.2011, 16:24
Hello,
I made a 'script' for 'OnPlayerStreamIn/out'
here is the code:
The weard thing is, if there is a NPC by me, it plays the sound. And alll the other time, it will send just random the message's. Even if their is no npc at all. I don't now whats wrong, i don't now how to fix it. I hope you can help me.
Sorry for my bad english. MathijsS
I made a 'script' for 'OnPlayerStreamIn/out'
here is the code:
Код:
public OnPlayerStreamIn(playerid, forplayerid) { PlayerPlaySound(playerid, 1083, 0.0, 0.0, 10.0); new PlayerName[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(string, sizeof(string), "[STREAM-IN]{FFFFFF} %s.", PlayerName); SendClientMessageToAll(COLOR_ORANGE, string); return 1; } //---------------------------------------------------------- public OnPlayerStreamOut(playerid, forplayerid) { PlayerPlaySound(playerid, 1084, 0.0, 0.0, 10.0); new PlayerName[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(string, sizeof(string), "[STREAM-OUT]{FFFFFF} %s.", PlayerName); SendClientMessageToAll(COLOR_ORANGE, string); return 1; }
Sorry for my bad english. MathijsS