NEED HELP NOW !!! About a cmd ...
#1

SOLVED!
Reply
#2

Make sure you are using the gamemode/filterscript that you're compiling.
Reply
#3

Quote:
Originally Posted by Dudits
Посмотреть сообщение
Make sure you are using the gamemode/filterscript that you're compiling.
? i don't understand xD ... it's just a gamemode command ...
Reply
#4

Try this. Not tested
pawn Код:
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;
        }

    }
Reply
#5

pawn Код:
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;
        }
Reply
#6

Quote:
Originally Posted by pantelimonfl
Посмотреть сообщение
Try this. Not tested
pawn Код:
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;
        }

    }
Quote:
Originally Posted by AK47317
Посмотреть сообщение
pawn Код:
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;
        }
OMG >_< i have tested all of your cmd, but still 'You are not a medic/admin'?
Reply
#7

sorry for 2 post..

lol when i type there's no post b4 it so then... LOL
Reply
#8

Quote:
Originally Posted by AK47317
Посмотреть сообщение
sorry for 2 post..

lol when i type there's no post b4 it so then... LOL
Ok ??!!
Reply
#9

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.
Reply
#10

Quote:
Originally Posted by Infamous
Посмотреть сообщение
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.
Aah, here is the recieving message used ... but it's correct ?! or not ..

pawn Код:
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;
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)