08.10.2009, 21:01
Well, as nobody gave you the exact determination of how to figure this, I'll just copy over all what I've found regarding this and what I know you might be needing to script this small thing. If you have never scripted this, you might also figure to request it from somebody as this small snippet wont take much time from a person who knows how to handle pawn.
Anyway:
First of all, everything you need can be found in a_players.inc . To find your "inc" which stands for include, you'll have to head to your pawno(commonly called pawno) folder. Once you are in it, search for a "include" folder, where you can find a_samp.inc, a_players.inc, etc inside.
So, here is a small snippet of a_players.inc:
So, a special action has to be set for a player first, so that he/she will be drinking a beer for example. To set a player into a special action, you can easily use:
Furthermore, all you have to do is make your own command or anything similar assigning you to that special action and you are done.
Anyway:
First of all, everything you need can be found in a_players.inc . To find your "inc" which stands for include, you'll have to head to your pawno(commonly called pawno) folder. Once you are in it, search for a "include" folder, where you can find a_samp.inc, a_players.inc, etc inside.
So, here is a small snippet of a_players.inc:
pawn Код:
#define SPECIAL_ACTION_DRINK_BEER 20
#define SPECIAL_ACTION_SMOKE_CIGGY 21
#define SPECIAL_ACTION_DRINK_WINE 22
#define SPECIAL_ACTION_DRINK_SPRUNK 23
pawn Код:
SetPlayerSpecialAction(playerID, actionID);
// For example:
SetPlayerSpecialAction(0, SPECIAL_ACTION_DRINK_BEER); // We use the macro incase of changes within sa-mp and ID 0 is you when you are self-hosting and you are alone!