02.03.2011, 11:40
(
Последний раз редактировалось Michael@Belgium; 13.03.2011 в 19:48.
Причина: Solved !
)
SOLVED!
if(strcmp(cmdtext, "/firemencmds", true) == 0)
{
if(gTeam[playerid] == FIREMEN)
{
SendClientMessage(playerid, COLOR_WHITE, "------------------------------FIREMAN COMMANDS------------------");
SendClientMessage(playerid, COLOR_ORANGE, "[TRY THAT!] /fire ** /gowork ** [TEAMCHAT] /! <message>");
SendClientMessage(playerid, COLOR_ORANGE, "[PRACTICE] /makefire <1/2/3/4/5>");
SendClientMessage(playerid, COLOR_WHITE, "-----------------------------------------------------------------------");
return 1;
}
}
if(strcmp(cmdtext, "/firemencmds", true) == 0)
{
if(gTeam[playerid] == FIREMEN)
{
SendClientMessage(playerid, COLOR_WHITE, "------------------------------FIREMAN COMMANDS------------------");
SendClientMessage(playerid, COLOR_ORANGE, "[TRY THAT!] /fire ** /gowork ** [TEAMCHAT] /! <message>");
SendClientMessage(playerid, COLOR_ORANGE, "[PRACTICE] /makefire <1/2/3/4/5>");
SendClientMessage(playerid, COLOR_WHITE, "-----------------------------------------------------------------------");
} else SendClientMessage(playerid, color..., "You're Not A Fireman!.");
return 1;
}
Try this. Not tested
pawn Код:
|
pawn Код:
|
Search for the message your recieving within your script and make sure the if statement is returning the message correcty and not just sending it.
|
if(strcmp("/healplayer", cmd, true) == 0)
{
if (gTeam[playerid] == MEDIC || gTeam[playerid] == ADMIN)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
return SendClientMessage(playerid,COLOR_GREEN,"USAGE: /heal [id]");
}
new id = strval(tmp);
new pid = playerid;
if(!IsPlayerConnected(id))
{
return SendClientMessage(playerid,COLOR_BROWN,"This player is not online!");
}
new Float:X,Float:Y,Float:Z, string[128], name[MAX_PLAYER_NAME];
GetPlayerName(id,name,128);
GetPlayerPos(id,X,Y,Z);
if(IsPlayerInRangeOfPoint(playerid,3,X,Y,Z))
{
format(string,128,"[INFO] Medic/Admin %s[%d] has healed you!", name, pid);
SetPlayerHealth(id,100);
SendClientMessage(id,COLOR_YELLOWORANGE,string);
SendClientMessage(playerid, COLOR_GREEN, " You have succesfully healed the player !");
DisablePlayerCheckpoint(playerid);
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED,"You're not near the player!");
}
}
else
{
SendClientMessage(playerid,COLOR_GREY,"You're not a Medic/Admin!");//here !
}
return 1;
}