radio system
#3

sry for not posting in the "code"..firstly

below the #includes:

forward radiomessage();
new pclass[MAX_PLAYERS]
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
//----------------------------
at:
public OnPlayerRequestClass(playerid, classid)
{
pclass[playerid] = classid;
return1;
}
//----------------------------
Anywhere:

public radiomessage()
{
for(new i=0; i < GetMaxPlayers; i++)
if(IsPlayerConnected(i)){
if(pclass[playerid] == 106 || pclass[playerid}] == 105 || pclass[playerid}] == 107){
SendClientMessage(i, color, string);
}
}
return 1;
}
//----------------------------
Anywhere:
dcmd_r(playerid, params[])
{
new pname[MAX_PLAYER_NAME], string[256];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s in Radio: %s", pname, params);
radiomessage(COLORYOUWANT, string);
return 1;
}
//----------------------------

At:
OnPlayerCommandText(playerid, cmdtext);
{
dcmd(r, 1, cmtext);
return 1;
}




Try that...
Reply


Messages In This Thread
radio system - by 02manchestera - 10.04.2010, 01:26
Re: radio system - by pmk1 - 10.04.2010, 01:34
Re: radio system - by Sascha - 10.04.2010, 01:39
Re: radio system - by 02manchestera - 10.04.2010, 02:22
Re: radio system - by 02manchestera - 10.04.2010, 03:35
Re: radio system - by Steven82 - 10.04.2010, 04:31

Forum Jump:


Users browsing this thread: 2 Guest(s)