Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void G_SelectWeaponIndex(int clientNum, int iWeaponIndex)
- {
- SV_GameSendServerCommand(clientNum, 0, va("%c %i", 'a', iWeaponIndex));
- }
- void G_SetModel(int entity, const char * modelName)
- {
- *(short*)(G_Entity(entity) + 0x168) = G_ModelIndex(modelName);
- }
- void SetMiniMap(int client, char * material, float ULX, float ULY, float LRX, float LRY)
- {
- SV_GetConfigstring(0x422, va("\"%s\" %f %f %f %f", material, ULX, ULY, LRX, LRY));
- }
- void iPrintln(int client, const char* text, ...)
- {
- SV_GameSendServerCommand(client, 0, va("%c \"%s\"", 'f', text));
- }
- void iPrintlnBold(int client, const char* text, ...)
- {
- SV_GameSendServerCommand(client, 0, va("%c \"%s\"", 'c', text));
- }
- void Scr_SetNumParam(int numOfParms)
- {
- *(int*)0x835C49F0 = numOfParms;
- }
- void switchToWeapon(int client, char * weapon)
- {
- G_SelectWeaponIndex(client, G_GetWeaponIndexForName(weapon));
- }
- void giveMaxAmmo(int client, char * weapon)
- {
- Add_Ammo((int*)G_Entity(client), G_GetWeaponIndexForName(weapon), 0, BG_GetAmmoPlayerMax((int*)G_Client(client), G_GetWeaponIndexForName(weapon), 0), 1);
- }
- int WeaponClipSize(char * weapon)
- {
- return BG_GetWeaponDef(G_GetWeaponIndexForName(weapon));
- }
- void giveStartAmmo(int client, char * weapon)
- {
- G_InitializeAmmo((int)G_Entity(client), G_GetWeaponIndexForName(weapon), 0, 0);
- }
- void giveWeapon(int client, char * weapon, int akimbo = 0, int camo = 0)
- {
- G_GivePlayerWeapon((int)G_Client(client), G_GetWeaponIndexForName(weapon), akimbo, camo);
- G_InitializeAmmo((int)G_Entity(client), G_GetWeaponIndexForName(weapon), akimbo, camo);
- }
- void SetActionSlot(int client, int slot, char * optionName, const char * weapon = "")
- {
- if (slot < 1 || slot > 4)
- return;
- slot -= 1;
- if (!stricmp(optionName, "weapon"))
- {
- _821F2D88(weapon);
- *(int*)(G_Client(client) + ((slot + 0x114) * 4)) = 1;
- *(int*)(G_Client(client) + ((slot + 0x114) * 4)) = BG_FindWeaponIndexForName(weapon);
- }
- else if (!stricmp(optionName, "altmode"))
- {
- *(int*)(G_Client(client) + ((slot + 0x114) * 4)) = 2;
- }
- else if (!stricmp(optionName, "nightvision"))
- {
- *(int*)(G_Client(client) + ((slot + 0x114) * 4)) = 3;
- }
- }
- void setOrigin(int client, float x, float y, float z)
- {
- *(float*)(G_Client(client) + 0x1C) = x; //x
- *(float*)(G_Client(client) + 0x20) = y; //y
- *(float*)(G_Client(client) + 0x24) = z; //z
- }
- void SetClientDvar(int client, char * dvar, char * value)
- {
- SV_GameSendServerCommand(client, 0, va("%c %s \"%s\"", 's', dvar, value));
- }
- void Hide(int client)
- {
- *(char*)(G_Client(client) + 0xB3) = 0x20;
- }
- void Show(int client)
- {
- *(char*)(G_Client(client) + 0xB3) = 0x00;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement