I need help making my own stock
#3

Quote:
Originally Posted by Devilxz97
Посмотреть сообщение
format is easy,
pawn Код:
new string[256];
    format(string, sizeof(string), "takes out his %s", weaponname);
    SendMeMessage(playerid, -1, string);
Not like that ... like this:

pawn Код:
stock SendMeMessage(playerid)
{
    new string[128], name[24], weapon;
   
    weapon = GetPlayerWeapon(playerid);
   
    GetPlayerName(playerid,name,24);
   
    if(weapon == 9) // chainsaw
    {
        format(string,128,"%s (%d) Takes Out His Chainsaw.",name,playerid);
    }
    return 1;
}
In a command, use SendMeMessage(playerid);

Note: This stock is just an example and is only getting weapon id 9 which is a chainsaw and will not work for anything else unless you modify it yourself. Just skim through it so you understand it better.
Reply


Messages In This Thread
I need help making my own stock - by ddnbb - 09.08.2012, 05:14
Re: I need help making my own stock - by Devilxz97 - 09.08.2012, 05:45
Re: I need help making my own stock - by grand.Theft.Otto - 09.08.2012, 06:15
Re: I need help making my own stock - by ddnbb - 09.08.2012, 06:28
Re: I need help making my own stock - by Devilxz97 - 09.08.2012, 07:47

Forum Jump:


Users browsing this thread: 1 Guest(s)