Help in dcmd, and GameTextForPlayer
#7

You need to have this if you are using dcmd
pawn Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Definition
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
dcmd(heal,4,cmdtext);
return 0;
}
Then Your Command Bellow
pawn Код:
dcmd_heal(playerid,params[]) // need to put it so it will not show as undefined and will also read the command
{
    if(AccInfo[playerid][Level] >= 1)
    {
    SetPlayerHealth(playerid, 100);
    SetGameTextForPlayer(playerid, "You have been healed", 4, 3000);
    }
    return 1;
    }
And For Gametext i have no idea for Dark Green And Aqua but! here is blue,green,purple
pawn Код:
case 11:
        {
            GameTextForPlayer(playerid, "~b~S.W.A.T", 3000, 3); //Blue
        }
pawn Код:
case 13, 14:
        {
            GameTextForPlayer(playerid, "~p~Medics", 3000, 3); //Purple
        }
pawn Код:
case 15, 16:
        {
            GameTextForPlayer(playerid, "~g~Taxi Drivers", 3000, 3); //Green
        }
Hope you understand it
PS: I tried to explain it very for all people who doesn't know about it
Reply


Messages In This Thread
Help in dcmd, and GameTextForPlayer - by Goldino - 14.12.2012, 16:51
Re: Help in dcmd, and GameTextForPlayer - by Lz - 14.12.2012, 16:54
Re: Help in dcmd, and GameTextForPlayer - by Goldino - 14.12.2012, 16:55
Re: Help in dcmd, and GameTextForPlayer - by Goldino - 14.12.2012, 17:03
Re: Help in dcmd, and GameTextForPlayer - by Lynet - 14.12.2012, 18:20
Re: Help in dcmd, and GameTextForPlayer - by Lz - 14.12.2012, 18:25
Re: Help in dcmd, and GameTextForPlayer - by Patrick - 14.12.2012, 20:55
Re: Help in dcmd, and GameTextForPlayer - by Mean - 14.12.2012, 23:35
Re: Help in dcmd, and GameTextForPlayer - by Threshold - 15.12.2012, 01:44

Forum Jump:


Users browsing this thread: 2 Guest(s)