New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#304: Fixed inconsistencies in Player 'get' functions #308

Merged
merged 1 commit into from Aug 10, 2018

Conversation

Projects
4 participants
@Addlibs
Contributor

Addlibs commented Aug 6, 2018

All get functions accept only CPlayer except the following which take CElement but later restricted to player and console only (they returned somewhat useful info when console was passed, and some scripts may rely on this still being the case)

  • getPlayerName
  • getPlayerIP
  • getPlayerAccount

The following set/do functions changed to accept only players as they do not use RUN_CHILDREN internally but previously allowed for non-player elements

  • SetPlayerName
  • RedirectPlayer

The following set/do functions remain unchanged as they use RUN_CHILDREN thus should allow non-players elements as long as they have at least one child that is a player (unless that should change)

  • SetPlayerMoney
  • GivePlayerMoney
  • ShowPlayerHudComponent
  • TakePlayerScreenShot
  • SetPlayerWantedLevel
  • ForcePlayerMap
  • SetPlayerNametagText (not sure if its useful to run this on children)
  • SetPlayerNametagColor
  • SetPlayerNametagShowing
  • SetPlayerMuted
  • SetPlayerBlurLevel
  • PlaySoundFrontEnd
  • ShowCursor
  • ShowChat
  • PlayMissionAudio
  • PreloadMissionAudio

If there's anything that could be done better, let me know.

This PR closes #304

@patrikjuvonen patrikjuvonen added the bug label Aug 6, 2018

@patrikjuvonen patrikjuvonen added this to In progress in release/v1.5.6 via automation Aug 6, 2018

@patrikjuvonen patrikjuvonen added this to the 1.5.6 milestone Aug 6, 2018

@Pirulax

This comment has been minimized.

Show comment
Hide comment
@Pirulax

Pirulax Aug 7, 2018

Contributor

Good to know that I can pass root instead of the player, but It's not mentioned on the Wiki

Contributor

Pirulax commented Aug 7, 2018

Good to know that I can pass root instead of the player, but It's not mentioned on the Wiki

@qaisjp

This comment has been minimized.

Show comment
Hide comment
@qaisjp

qaisjp Aug 7, 2018

Member
Member

qaisjp commented Aug 7, 2018

@qaisjp qaisjp merged commit 6780fbd into multitheftauto:master Aug 10, 2018

3 checks passed

WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

release/v1.5.6 automation moved this from In progress to Done Aug 10, 2018

@qaisjp

This comment has been minimized.

Show comment
Hide comment
@qaisjp

qaisjp Aug 10, 2018

Member

Thank you! Good work 🙂

Member

qaisjp commented Aug 10, 2018

Thank you! Good work 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment