Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.91 KB | None | 0 0
  1. //
  2. // Test include
  3. //
  4.  
  5. #if defined _my_teststock
  6.     #endinput
  7. #endif
  8. #define _my_teststock
  9.  
  10. static Handle hGameConf;
  11. static Handle hGiveNamedItem;
  12.    
  13. stock RegSDKCallHGiveNamedItem()
  14. {
  15.     if(hGameConf == 0)
  16.     {
  17.         hGameConf = LoadGameConfigFile("sdktools.games/engine.csgo");
  18.         LogMessage("should work %i", hGameConf);
  19.     }
  20.    
  21.     if(hGiveNamedItem == 0)
  22.     {
  23.         StartPrepSDKCall(SDKCall_Player);
  24.         PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, "GiveNamedItem");
  25.         PrepSDKCall_SetReturnInfo(SDKType_CBaseEntity, SDKPass_Pointer);
  26.         PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);
  27.         PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);
  28.         hGiveNamedItem = EndPrepSDKCall();
  29.        
  30.         LogMessage("should work:%i", hGiveNamedItem);
  31.     }
  32. }
  33.  
  34. stock SDKCallGiveNamedItem(int client, char[] item)
  35. {
  36.     SDKCall(hGiveNamedItem, client, item, 0);
  37.     //GivePlayerItem(client, item, 0); this is fine it works
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement