Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Test include
- //
- #if defined _my_teststock
- #endinput
- #endif
- #define _my_teststock
- static Handle hGameConf;
- static Handle hGiveNamedItem;
- stock RegSDKCallHGiveNamedItem()
- {
- if(hGameConf == 0)
- {
- hGameConf = LoadGameConfigFile("sdktools.games/engine.csgo");
- LogMessage("should work %i", hGameConf);
- }
- if(hGiveNamedItem == 0)
- {
- StartPrepSDKCall(SDKCall_Player);
- PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, "GiveNamedItem");
- PrepSDKCall_SetReturnInfo(SDKType_CBaseEntity, SDKPass_Pointer);
- PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);
- PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);
- hGiveNamedItem = EndPrepSDKCall();
- LogMessage("should work:%i", hGiveNamedItem);
- }
- }
- stock SDKCallGiveNamedItem(int client, char[] item)
- {
- SDKCall(hGiveNamedItem, client, item, 0);
- //GivePlayerItem(client, item, 0); this is fine it works
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement