18.07.2013, 02:45
So i have
a inside game radio managment
which you can play music for other player while you are ingame
what i want is the if i am the owner of radio #1 and a player is listening to Radio #1
and i type /microfono1 (message) it will send a message to all player listening to radio #1
so this is what i was trying to do
Help Help Help please!!!
If you help me i will give you the filterscript (If you want)
a inside game radio managment
which you can play music for other player while you are ingame
what i want is the if i am the owner of radio #1 and a player is listening to Radio #1
and i type /microfono1 (message) it will send a message to all player listening to radio #1
so this is what i was trying to do
pawn Код:
if (strcmp("/Microfono1", cmdtext, true, 11) == 0)
{
if(strlen(cmdtext) <= 11)
{
SendClientMessage(playerid,0xC7C7C7FF,"USAGE: /microfono1 (message) - Enter A Valid Cop Message.");
return 1;
}
else
{
new output[255];
new string[128];
strmid(output,cmdtext,3,strlen(cmdtext));
format(string, sizeof(string), "[Locutor de Radio %d]: %s", Emisser[1],output);
for(new i = 0; i < MAX_PLAYERS; i++)
{
checkindex(playerid);
if(GetVar(playerid, "pvar1") == 1)
{
format(string, sizeof(string), "[Locutor de Radio %s]: %s",Emisser[1],output);
Microfono1(blue,string);
//SendClientMessage(i,blue,string);
return 1;
}
else
{
if(isnull(cmdtext)) return SendClientMessage(playerid,0xC7C7C7FF,"usted no es locutor de radio.");
SendClientMessage(playerid,0xC7C7C7FF,"usted no es locutor de radio.");
return 1;
}
}
}
}
forward Microfono1(color,const string[]);
public Microfono1(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new pvar1 = GetPVarInt(i,"pvar1");
if(IsPlayerConnected(i) == 1) if(pvar1==pvar1) SendClientMessage(i,color,string);
}
return 1;
}
Help Help Help please!!!
If you help me i will give you the filterscript (If you want)