Informations
#1

Well how do I Make it so i have like informations? Like SendInformationMessage(playerid, color, infomessage)


like I want to make a stock with messages like


Код:
stock Info()
{
           case 1: SendClientMessage(playerid, COLOR_RED, "<!>You need to get a car");
           case 2: SCM(playerid, COLOR_RED, "<!>You need to get a drinK!");
}
But they are not supposted to be random! NO!

I want to make it so me can add to command

Info(case1); and it will send message player
Reply
#2

pawn Код:
CMD:info(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /Info < Info ID > ");

    new inf = strval(params);

    switch(inf)
    {
         case 0: SendClientMessage(playerid, -1, "<!>You need to get a car");
         case 1: SendClientMessage(playerid, -1, "<!>You need to get a drinK!");
    }
    return 1;
}
Now you can use it like: /Info 0, and that will send "<!>You need to get a car"
Reply
#3

no no no not that


I want use that in a comand. Like this


Код:
CMD:arrested(playerid,params[])
{
	SendClientMessage(playerid,color,infomesage:1);
	return 1;
}
that sends player message number 1 from the stock
Reply
#4

pawn Код:
stock SendPlayerMessage(playerid, color, hint)
{
    switch(hint)
    {
         case 0: SendClientMessage(playerid, color, "<!>You need to get a car");
         case 1: SendClientMessage(playerid, color, "<!>You need to get a drinK!");
    }
    return 1;
}
Like that? Then you can use it like:

pawn Код:
CMD:arrested(playerid,params[])
{
    SendPlayerMessage(playerid, color, 1);
    return 1;
}
Reply
#5

Quote:
Originally Posted by -Prodigy-
Посмотреть сообщение
pawn Код:
stock SendPlayerMessage(playerid, color, hint)
{
    switch(hint)
    {
         case 0: SendClientMessage(playerid, color, "<!>You need to get a car");
         case 1: SendClientMessage(playerid, color, "<!>You need to get a drinK!");
    }
    return 1;
}
Like that? Then you can use it like:

pawn Код:
CMD:arrested(playerid,params[])
{
    SendPlayerMessage(playerid, color, 1);
    return 1;
}
YOU GOOD! I REP YOU!





but me found a problem. what i do when i want to check?

like

if(hintson[playerid])

where to add that sir?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)