COMMAND:r(playerid, params[])
{
if (!strlen(params[0])) return SendClientMessage(playerid,White,"Usage: /r [Message]");
new playername3[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid,playername3,sizeof(playername3));
new id;
if(GetPlayerTeam(id) == 1)
{
if(Leader[id] == 1) format(string,sizeof (string), "** Command Chief Master %s: %s, over **",playername3, params[0]);
SendClientMessage(playerid,0xFF0000FF, String);
}
else if(GetPlayerTeam(id) == 1)
{
if(Member[id] == 1) format(string, sizeof (string), "** Member %s: %s, over **",playername3, params[0]);
SendClientMessage(playerid,0xFF0000FF, String);
}
else if(Leader[id] == 2)
{
format(string,sizeof (string), "** Command Chief Master %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0xFFFF00AA,string);
}
else if(Member[id] == 2)
{
format(string, sizeof (string), "** Member %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0x8F8F8FFF,string);
}
else if(Leader[id] == 3)
{
format(string,sizeof (string), "** Command Chief Master %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0xFFFF00AA,string);
}
else if(Member[id] == 3)
{
format(string, sizeof (string), "** Member %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0x8F8F8FFF,string);
}
else if(Leader[id] == 0)
{
format(string,sizeof (string), "** Member %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0x8F8F8FFF,string);
}
else if(Member[id] == 0)
{
format(string, sizeof (string), "** Member %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0x8F8F8FFF,string);
}
return 1;
}
SendClientMessage(playerid,
SendClientMessageToAll
if(GetPlayerTeam(0) == 1)
{
if(Leader[0] == 1) format(string,sizeof (string), "** Command Chief Master %s: %s, over **",playername3, params[0]);
SendClientMessage(playerid,0xFF0000FF, String);
}
else if(GetPlayerTeam(0) == 1)
{
if(Member[0] == 1) format(string, sizeof (string), "** Member %s: %s, over **",playername3, params[0]);
SendClientMessage(playerid,0xFF0000FF, String);
}
else if(Leader[0] == 2)
{
format(string,sizeof (string), "** Command Chief Master %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0xFFFF00AA,string);
}
else if(Member[0] == 2)
{
format(string, sizeof (string), "** Member %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0x8F8F8FFF,string);
}
else if(Leader[0] == 3)
{
format(string,sizeof (string), "** Command Chief Master %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0xFFFF00AA,string);
}
else if(Member[0] == 3)
{
format(string, sizeof (string), "** Member %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0x8F8F8FFF,string);
}
else if(Leader[0] == 0)
{
format(string,sizeof (string), "** Member %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0x8F8F8FFF,string);
}
else if(Member[0] == 0)
{
format(string, sizeof (string), "** Member %s: %s, over **",playername3, params[0]);
SendClientMessageToAll(0x8F8F8FFF,string);
}
Again I see this strange logic, people just creating variables called id or playerid, storing nothing in it, therefore it's defaulted at 0. Then using it to do important checks in the code. I'm not sure what you're trying to do here.
All this entire piece of code is actually doing, is this: pawn Код:
|