SA-MP Forums Archive
Informations - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Informations (/showthread.php?tid=474867)



Informations - Pawnie - 10.11.2013

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


Re: Informations - -Prodigy- - 10.11.2013

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"


Re: Informations - Pawnie - 10.11.2013

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


Re: Informations - -Prodigy- - 10.11.2013

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;
}



Re: Informations - Pawnie - 10.11.2013

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?