Advertisement
Guest User

OnPlayerUseVending

a guest
Aug 11th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.71 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. forward OnPlayerUseVending(playerid);
  4. forward VendCheck(playerid);
  5.  
  6. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
  7.     if(IsKeyJustDown(KEY_SECONDARY_ATTACK, newkeys, oldkeys)) {
  8.         if(GetPlayerAnimationIndex(playerid)!=1660) SetTimerEx("VendCheck", 500, false, "d", playerid);
  9.     }
  10.     return 1;
  11. }
  12.  
  13. #if defined _ALS_OnPlayerKeyStateChange
  14.     #undef OnPlayerKeyStateChange
  15. #else
  16.     #define _ALS_OnPlayerKeyStateChange
  17. #endif
  18. #define OnPlayerKeyStateChange vend_OnPlayerKeyStateChange
  19. forward vend_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
  20.  
  21. public VendCheck(playerid){
  22.     if(GetPlayerAnimationIndex(playerid)==1660) CallLocalFunction("OnPlayerUseVending", "i", playerid);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement