Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case ACSF_GetWeapon:
- {
- // [RC] GetWeapon
- enum
- {
- GWF_GETTAG = 1,
- };
- int flags = argCount >= 1 && args[0] ? args[0] : 0;
- AWeapon *weapon = activator->player->ReadyWeapon;
- if (activator == NULL || activator->player == NULL || // Non-players do not have weapons
- activator->player->ReadyWeapon == NULL)
- {
- return GlobalACSStrings.AddString("None", stack, stackdepth);
- }
- else
- {
- if (argCount >= 1 && flags & GWF_GETTAG)
- {
- return GlobalACSStrings.AddString((weapon->Tag == NULL) ? weapon->GetClass()->TypeName.GetChars() : weapon->Tag->GetChars(), stack, stackdepth);
- }
- else
- {
- return GlobalACSStrings.AddString(weapon->GetClass()->TypeName.GetChars(), stack, stackdepth);
- }
- }
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement