|
if (strcmp("/myteam", cmdtext, true, 10) == 0) { if(pTeam[playerid] == POLICE){ SendClientMessage(playerid,COLOR_BLUE,"You're a police officer"); return 1; } if(pTeam[playerid] == CRINIMALS){ SendClientMessage(playerid,COLOR_RED,"You're a crinimal"); return 1; } |
|
new pTeam[MAX_PLAYERS]; #define TEAM_wCRINIMALS 0 #define TEAM_POLICE 1 |
if (strcmp("/myteam", cmdtext, true, 10) == 0)
{
if(pTeam[playerid] == TEAM_POLICE){
SendClientMessage(playerid,COLOR_BLUE,"You're a police officer");
return 1;
}
if(pTeam[playerid] == TEAM_CRINIMALS){
SendClientMessage(playerid,COLOR_RED,"You're a crinimal");
return 1;
}
|
ScRipTeRi: if (strcmp("/myteam", cmdtext, true, 10) == 0) { if(pTeam[playerid] == TEAM_POLICE){ SendClientMessage(playerid,COLOR_BLUE,"You're a police officer"); return 1; } if(pTeam[playerid] == TEAM_CRINIMALS){ SendClientMessage(playerid,COLOR_RED,"You're a crinimal"); return 1; } |
|
FishyZ: new pTeam[MAX_PLAYERS]; #define TEAM_wCRINIMALS 0 #define TEAM_POLICE 1 |
#define Criminals 0
#define Police 1
new pTeam[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/myteam", cmdtext, true, 10) == 0)
{
if(pTeam[playerid] == 0)
{
SendClientMessage(playerid, -1, "You are a criminal");
return 1;
}
if(pTeam[playerid] == 1)
{
SendClientMessage(playerid, -1, "You are a police officer");
return 1;
}
}
if (strcmp("/police", cmdtext, true, 10) == 0)
{
pTeam[playerid] = 1;
return 1;
}
if (strcmp("/criminal", cmdtext, true, 10) == 0)
{
pTeam[playerid] = 0;
return 1;
}
return 0;
}
if (strcmp("/myteam", cmdtext, true, 10) == 0)
{
new string[124];
format(string,sizeof(string),"%s",PlayersTeam(playerid));
SendClientMessage(playerid,-1,string);
return 1;
}
stock PlayersTeam(playerid)
{
new str[124];
if(pTeam[playerid] == POLICE)
format(str,sizeof(str),"Your team is: Police");
if(pTeam[playerid] == CRINIMALS)
format(str,sizeof(str),"Your team is: Criminals");
return str;
}
if (strcmp("/myteam", cmdtext, true, 10) == 0)
{
if(GetPlayerTeam == 0)
{
SendClientMessage(playerid,COLOR_GREEN,"Your team is criminals !");
}
else if(GetPlayerTeam == 1)
{
SendClientMessage(playerid,COLOR_GREEN,"Your team is police !");
}
}
}
new pTeam[playerid];