Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*=================================================================
- _ ____ _____ __ __
- (_) _ \ ___ |_ _|__ __ _| \/ |
- | | |_) / __| | |/ _ \/ _` | |\/| |
- | | __/\__ \ | | __/ (_| | | | |
- |_|_| |___/ |_|\___|\__,_|_| |_|
- Created by Bruno da Silva
- www.ips-team.blogspot.com
- No more messages on Audio Stream SA:MP
- =================================================================*/
- enum eMessageData
- {
- msgColor,
- msgText[128]
- }
- new
- gMessageData[MAX_PLAYERS][21][eMessageData],
- sendMessages[MAX_PLAYERS] = {-1, ...}
- ;
- SendClientMessageInternal(playerid, color, message[])
- {
- if(sendMessages[playerid] == 20)
- {
- sendMessages[playerid] = -1;
- }
- gMessageData[playerid][++sendMessages[playerid]][msgColor] = color;
- format(gMessageData[playerid][sendMessages[playerid]][msgText], 128, message);
- return SendClientMessage(playerid, color, message);
- }
- stock PlayAudioInternal(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0)
- {
- PlayAudioStreamForPlayer(playerid, url, posX, posY, posZ, distance, usepos);
- for(new i; sendMessages[playerid] >= i; ++i)
- {
- SendClientMessage(playerid, gMessageData[playerid][i][msgColor], gMessageData[playerid][i][msgText]);
- }
- return true;
- }
- public OnPlayerConnect(playerid)
- {
- for(new i; 21 > i; ++i)
- {
- gMessageData[playerid][i][msgText][0] = EOS;
- gMessageData[playerid][i][msgColor] = 0xFFFFFFFF;
- }
- sendMessages[playerid] = -1;
- return CallLocalFunction("CallOnPlayerConnect", "i", playerid);
- }
- #if defined HookOnPlayerConnect
- #undef OnPlayerConnect
- #else
- #define HookOnPlayerConnect
- #endif
- #define SendClientMessage SendClientMessageInternal
- #define PlayAudioStreamForPlayer PlayAudioInternal
- // ips_audiofix.inc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement