[HELP] /myteam problem. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: [HELP] /myteam problem. (
/showthread.php?tid=452776)
[HELP] /myteam problem. -
FishyZ - 22.07.2013
Quote:
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;
}
|
It will always say You're a crinimal.
Quote:
new pTeam[MAX_PLAYERS];
#define TEAM_wCRINIMALS 0
#define TEAM_POLICE 1
|
Any help?
Re: [HELP] /myteam problem. -
FishyZ - 22.07.2013
@Bump
Re: [HELP] /myteam problem. -
Red_Dragon. - 23.07.2013
Try this
pawn Код:
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] == wCRINIMALS){
SendClientMessage(playerid,COLOR_RED,"You're a crinimal");
return 1;
}
You defined it "wCRINIMALS" and wrote it in the command "CRINIMALS". Anyway, it's criminals not crinimals.