if(strcmp("/spy",cmdtext,true)==0)
{
if (GetPlayerScore(playerid) < 480) return SendClientMessage(playerid,COLOR_RED,"ERROR: You need 7 hours (480 minutes) of gameplay to use this command!");
if (Stealth[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"ERROR: You can't be a spy and have stealth mode activated!");
if (IsSpy[playerid] == 0)
{
if (PlayerTeam[playerid] == TEAM_JAPFLEET)
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if (PlayerTeam[i] == PlayerTeam[playerid])
{
new string[128], name[28];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"INFO: %s has turned into a spy and now he has the same color and skin of enemies, %s is still a team mate !");
SendClientMessage(i,COLOR_CYAN,string);
}
}
IsSpy[playerid] = 1;
SetPlayerColor(playerid,TEAM_AIRFORCEC);
SetPlayerSkin(playerid,285);
return 1;
}
else
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if (PlayerTeam[i] == PlayerTeam[playerid])
{
new string[128], name[28];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"INFO: %s has turned into a spy and now he has the same color and skin of enemies, %s is still a team mate !");
SendClientMessage(i,COLOR_CYAN,string);
}
}
IsSpy[playerid] = 1;
SetPlayerColor(playerid,TEAM_JAPFLEETC);
SetPlayerSkin(playerid,287);
return 1;
}
}
else if (IsSpy[playerid] == 1)
{
SendClientMessage(playerid,COLOR_CYAN,"INFO: Spy mode unactivated.");
if (PlayerTeam[playerid] == TEAM_JAPFLEET)
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if (PlayerTeam[i] == PlayerTeam[playerid])
{
new string[128], name[28];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"INFO: %s has diactivated the spy mode and now has the team color and skin !");
SendClientMessage(i,COLOR_CYAN,string);
}
}
SetPlayerSkin(playerid,287);
SetPlayerColor(playerid,TEAM_JAPFLEETC);
return 1;
}
else
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if (PlayerTeam[i] == PlayerTeam[playerid])
{
new string[128], name[28];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"INFO: %s has diactivated the spy mode and now has the team color and skin !");
SendClientMessage(i,COLOR_CYAN,string);
}
}
SetPlayerSkin(playerid,285);
SetPlayerColor(playerid,TEAM_AIRFORCEC);
return 1;
}
}
}
format(string,sizeof(string),"INFO: %s has turned into a spy and now he has the same color and skin of enemies, %s is still a team mate !", ?????, ?????);
Код:
format(string,sizeof(string),"INFO: %s has turned into a spy and now he has the same color and skin of enemies, %s is still a team mate !", ?????, ?????); |