Special actions
#1

I have tried to code something so that when you walk up to a point (table with beer) and hit a button, it sets the drinking action.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK))
    {
        if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_NONE) {
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
        SendMsg(playerid, "Press ~b~~k~~VEHICLE_ENTER_EXIT~ ~w~to drop.");
        }
    }
    return 1;
}
But instead of applying the special action, it just creates a bottle infront of Carl's hand, and if I press 'fire' he punches instead of drinking. I have nothing elsewhere in my script creating an object, what have I done?

PS. If anyone knows the ID of a crack pipe Sweet uses or the bong Tenpenny uses in some cutscenes, or if they're not available in SAMP, please let me know.

Thanks
-Aston
Reply


Messages In This Thread
Special actions - by AstonDA-G - 19.11.2013, 20:40
Re: Special actions - by DarkLored - 19.11.2013, 20:49
Re: Special actions - by AstonDA-G - 19.11.2013, 20:53

Forum Jump:


Users browsing this thread: 1 Guest(s)