26.03.2011, 11:53
i need to make this without cmd with out /g or /global just chat
and
i need to change this to /r and /radio
Please Fast I need to update
pawn Код:
if(strcmp(cmd, "/global", true) == 0 || strcmp(cmd, "/g", true) == 0)
{
for(new i=0; i<256; i++)
{
if( i>=3)
{
if( strfind(cmdtext[i], "hack", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
if( strfind(cmdtext[i], "hacks", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
if( strfind(cmdtext[i], "hacker", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
if( strfind(cmdtext[i], "hackz", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
if( strfind(cmdtext[i], "hax", true ) == 0) return SendClientMessage(playerid, COLOR_RED, "Use /report for hackers !");
}
}
if( gTeam[playerid] == TEAM_JAPAN )
{
GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
printf("Global Chat: %s: %s", nameee, cmdtext[3]);
}
if( gTeam[playerid] == TEAM_RUSSIA )
{
GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
printf("Global Chat: %s: %s", nameee, cmdtext[3]);
}
if( gTeam[playerid] == TEAM_MERC )
{
GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
printf("Global Chat: %s: %s", nameee, cmdtext[3]);
}
if( gTeam[playerid] == TEAM_USA )
{
GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
printf("Global Chat: %s: %s", nameee, cmdtext[3]);
}
if( gTeam[playerid] == TEAM_GERMANY )
{
GetPlayerName(playerid,nameee,sizeof(nameee)); format(string,sizeof(string),"[%i](%s): %s",playerid,nameee,cmdtext[3]); SendClientMessageToAll(COLOR_LIGHTRED, string);
printf("Global Chat: %s: %s", nameee, cmdtext[3]);
}
return 1;
}
i need to change this to /r and /radio
pawn Код:
public OnPlayerText(playerid, text[])
{
if(Muted[playerid])
{
SendClientMessage(playerid,RED,"JunkBuster: You are not allowed to chat because you have been muted!");
return 0;
}
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 3000);
new string[128];
if(gTeam[playerid] == TEAM_USA)
{
if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"USA RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
SendUSAMessage(COLOR_LIGHTBLUE, string);
}
else if(GetPlayerWantedLevel(playerid) == 2)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"USA RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
SendUSAMessage(COLOR_LIGHTBLUE, string);
}
else if(GetPlayerWantedLevel(playerid) == 3)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"USA RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
SendUSAMessage(COLOR_LIGHTBLUE, string);
}
else if(GetPlayerWantedLevel(playerid) == 4)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"USA RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
SendUSAMessage(COLOR_LIGHTBLUE, string);
}
else if(GetPlayerWantedLevel(playerid) == 5)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"USA RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
SendUSAMessage(COLOR_LIGHTBLUE, string);
}
else if(GetPlayerWantedLevel(playerid) == 6)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"USA RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
SendUSAMessage(COLOR_LIGHTBLUE, string);
}
else if(GetPlayerWantedLevel(playerid) == 7)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"USA RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
SendUSAMessage(COLOR_LIGHTBLUE, string);
}
else if(GetPlayerWantedLevel(playerid) == 8)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"USA RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
SendUSAMessage(COLOR_LIGHTBLUE, string);
}
else if(GetPlayerWantedLevel(playerid) == 9)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"USA RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
SendUSAMessage(COLOR_LIGHTBLUE, string);
}
else if(GetPlayerWantedLevel(playerid) == 10)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"USA RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
SendUSAMessage(COLOR_LIGHTBLUE, string);
}
else if(GetPlayerWantedLevel(playerid) >= 11)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"USA RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
SendUSAMessage(COLOR_LIGHTBLUE, string);
}
}
else if(gTeam[playerid] == TEAM_GERMANY)
{
if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"GERMANY RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
SendGERMANYMessage(COLOR_RED, string);
}
else if(GetPlayerWantedLevel(playerid) == 2)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"GERMANY RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
SendGERMANYMessage(COLOR_RED, string);
}
else if(GetPlayerWantedLevel(playerid) == 3)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"GERMANY RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
SendGERMANYMessage(COLOR_RED, string);
}
else if(GetPlayerWantedLevel(playerid) == 4)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"GERMANY RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
SendGERMANYMessage(COLOR_RED, string);
}
else if(GetPlayerWantedLevel(playerid) == 5)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"GERMANY RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
SendGERMANYMessage(COLOR_RED, string);
}
else if(GetPlayerWantedLevel(playerid) == 6)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"GERMANY RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
SendGERMANYMessage(COLOR_RED, string);
}
else if(GetPlayerWantedLevel(playerid) == 7)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"GERMANY RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
SendGERMANYMessage(COLOR_RED, string);
}
else if(GetPlayerWantedLevel(playerid) == 8)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"GERMANY RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
SendGERMANYMessage(COLOR_RED, string);
}
else if(GetPlayerWantedLevel(playerid) == 9)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"GERMANY RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
SendGERMANYMessage(COLOR_RED, string);
}
else if(GetPlayerWantedLevel(playerid) == 10)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"GERMANY RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
SendGERMANYMessage(COLOR_RED, string);
}
else if(GetPlayerWantedLevel(playerid) >= 11)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"GERMANY RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
SendGERMANYMessage(COLOR_RED, string);
}
}
else if(gTeam[playerid] == TEAM_MERC)
{
if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"MERCENARY RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
SendMERCMessage(COLOR_YELLOW, string);
}
else if(GetPlayerWantedLevel(playerid) == 2)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"MERCENARY RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
SendMERCMessage(COLOR_YELLOW, string);
}
else if(GetPlayerWantedLevel(playerid) == 3)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"MERCENARY RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
SendMERCMessage(COLOR_YELLOW, string);
}
else if(GetPlayerWantedLevel(playerid) == 4)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"MERCENARY RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
SendMERCMessage(COLOR_YELLOW, string);
}
else if(GetPlayerWantedLevel(playerid) == 5)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"MERCENARY RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
SendMERCMessage(COLOR_YELLOW, string);
}
else if(GetPlayerWantedLevel(playerid) == 6)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"MERCENARY RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
SendMERCMessage(COLOR_YELLOW, string);
}
else if(GetPlayerWantedLevel(playerid) == 7)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"MERCENARY RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
SendMERCMessage(COLOR_YELLOW, string);
}
else if(GetPlayerWantedLevel(playerid) == 8)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"MERCENARY RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
SendMERCMessage(COLOR_YELLOW, string);
}
else if(GetPlayerWantedLevel(playerid) == 9)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"MERCENARY RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
SendMERCMessage(COLOR_YELLOW, string);
}
else if(GetPlayerWantedLevel(playerid) == 10)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"MERCENARY RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
SendMERCMessage(COLOR_YELLOW, string);
}
else if(GetPlayerWantedLevel(playerid) >= 11)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"MERCENARY RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
SendMERCMessage(COLOR_YELLOW, string);
}
}
else if(gTeam[playerid] == TEAM_RUSSIA)
{
if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"RUSSIA RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
SendRUSSIAMessage(COLOR_ORANGE, string);
}
else if(GetPlayerWantedLevel(playerid) == 2)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"RUSSIA RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
SendRUSSIAMessage(COLOR_ORANGE, string);
}
else if(GetPlayerWantedLevel(playerid) == 3)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"RUSSIA RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
SendRUSSIAMessage(COLOR_ORANGE, string);
}
else if(GetPlayerWantedLevel(playerid) == 4)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"RUSSIA RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
SendRUSSIAMessage(COLOR_ORANGE, string);
}
else if(GetPlayerWantedLevel(playerid) == 5)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"RUSSIA RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
SendRUSSIAMessage(COLOR_ORANGE, string);
}
else if(GetPlayerWantedLevel(playerid) == 6)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"RUSSIA RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
SendRUSSIAMessage(COLOR_ORANGE, string);
}
else if(GetPlayerWantedLevel(playerid) == 7)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"RUSSIA RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
SendRUSSIAMessage(COLOR_ORANGE, string);
}
else if(GetPlayerWantedLevel(playerid) == 8)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"RUSSIA RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
SendRUSSIAMessage(COLOR_ORANGE, string);
}
else if(GetPlayerWantedLevel(playerid) == 9)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"RUSSIA RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
SendRUSSIAMessage(COLOR_ORANGE, string);
}
else if(GetPlayerWantedLevel(playerid) == 10)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"RUSSIA RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
SendRUSSIAMessage(COLOR_ORANGE, string);
}
else if(GetPlayerWantedLevel(playerid) >= 11)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"RUSSIA RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
SendRUSSIAMessage(COLOR_ORANGE, string);
}
}
else if(gTeam[playerid] == TEAM_JAPAN)
{
if(GetPlayerWantedLevel(playerid) == 1 || GetPlayerWantedLevel(playerid) == 0)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"JAPAN RADIO:(Private)[%s](%i): %s",nameee ,playerid,text);
SendJAPANMessage(COLOR_WHITE, string);
}
else if(GetPlayerWantedLevel(playerid) == 2)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"JAPAN RADIO:(Corporal)[%s](%i): %s",nameee ,playerid,text);
SendJAPANMessage(COLOR_WHITE, string);
}
else if(GetPlayerWantedLevel(playerid) == 3)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"JAPAN RADIO:(Sergeant)[%s](%i): %s",nameee ,playerid,text);
SendJAPANMessage(COLOR_WHITE, string);
}
else if(GetPlayerWantedLevel(playerid) == 4)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"JAPAN RADIO:(Lieutenant)[%s](%i): %s",nameee ,playerid,text);
SendJAPANMessage(COLOR_WHITE, string);
}
else if(GetPlayerWantedLevel(playerid) == 5)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"JAPAN RADIO:(Captain)[%s](%i): %s",nameee ,playerid,text);
SendJAPANMessage(COLOR_WHITE, string);
}
else if(GetPlayerWantedLevel(playerid) == 6)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"JAPAN RADIO:(Major)[%s](%i): %s",nameee ,playerid,text);
SendJAPANMessage(COLOR_WHITE, string);
}
else if(GetPlayerWantedLevel(playerid) == 7)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"JAPAN RADIO:(Colonel)[%s](%i): %s",nameee ,playerid,text);
SendJAPANMessage(COLOR_WHITE, string);
}
else if(GetPlayerWantedLevel(playerid) == 8)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"JAPAN RADIO:(LieutenantGen.)[%s](%i): %s",nameee ,playerid,text);
SendJAPANMessage(COLOR_WHITE, string);
}
else if(GetPlayerWantedLevel(playerid) == 9)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"JAPAN RADIO:(MajorGen.)[%s](%i): %s",nameee ,playerid,text);
SendJAPANMessage(COLOR_WHITE, string);
}
else if(GetPlayerWantedLevel(playerid) == 10)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"JAPAN RADIO:(General)[%s](%i): %s",nameee ,playerid,text);
SendJAPANMessage(COLOR_WHITE, string);
}
else if(GetPlayerWantedLevel(playerid) >= 11)
{
GetPlayerName(playerid,nameee,sizeof(nameee));
format(string,sizeof(string),"JAPAN RADIO:(GeneralOfArmy)[%s](%i): %s",nameee ,playerid,text);
SendJAPANMessage(COLOR_WHITE, string);
}
}
if(mute[playerid] == 1) return 0;
return 0;
}