Jump to content

» «

Can't call GetPlayerName inside a PrintStringWithLiteralStringNow

No replies to this topic
  • Zolika1351

    Ladies, hide your titties!

  • Members
  • Joined: 16 Jun 2014
  • Hungary


Posted 02 September 2017 - 08:17 AM Edited by Zolika1351, 02 September 2017 - 08:24 AM.

I'm trying to make a protection script, and it's already fully working, but really inconvenient that for example I can't see who changed to Niko or who it removed the freeze gun from.

Here's a part of the code:

if (HasCharGotWeapon(player, WEAPON_ROCKET))
	RemoveWeaponFromChar(player, WEAPON_ROCKET);
	Player FreezeGunIndex = ConvertIntToPlayerIndex(i);	
	print("~m~Someone gave" GetPlayerName(FreezeGunIndex) "the freeze gun! Removed.");

Print function:

void print(char* text)
	NativeInvoke::Invoke<ScriptVoid>("ADD_NEXT_MESSAGE_TO_PREVIOUS_BRIEFS", true);
	PrintStringWithLiteralStringNow("STRING", text, 3500, true);

But IntelliSense seems to not work properly and expects a ) before GetPlayerName. Is this a difference between SCO and C++, am I doing something wrong or is just Visual Studio bad?

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users