19.11.2013, 20:40
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.
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
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;
}
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