Jump to content

LoPollo

Members
  • Content Count

    353
  • Joined

  • Last visited

  • Days Won

    3

LoPollo last won the day on December 5 2016

LoPollo had the most liked content!

Community Reputation

64 Popular

1 Follower

About LoPollo

  • Rank
    Fool

Details

  • Location
    Italy

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @TheMOG isn't it better to trigger the event to a player table and bind the client-side to root/localPlayer? UNTESTED I remember triggering events on root isn't a good thing (i've not been around for some time, correct me if wrong)
  2. @Disy notice that the string isn't finished: "Lobby 1 0/10 Bakkara Competetive "
  3. var getElementData ( element theElement, string key [, inherit = true] ) You probably want to do this: getElementData(someElement,someKey,false) since getElementData(someElement,someKey,true) === getElementData(someElement,someKey) hope i've been clear
  4. @NeXuS™ the default inherit is true, so if you don't want it you must NOT leave blank, you MUST pass false.
  5. Changed "true" with the default (true)? mmm i would suggest posting the code where you set the data (on connect) Also, you may add an outputchatbox that tells you the data value when the player gets damaged Another advice, it could be better not binding the event to root but to localPlayer (so every player won't use it on other players, since they will have their own clientside script doing it)
  6. I can't understand.... Don't forget to report any error/warning you get, and if there are no errors to report then say explicitly that there are no errors.
  7. onResourceStart When a resource starts, the handler of that start will pass the passed resource as first parameter. There's no player to work with. You may want to loop all players and set the stats. Note that setPlayerStat is deprecated. Regarding setElementHealth, just to make sure you know: it will set the current HP, not the "stat" of health. Looking at the 2nd example of setPedStat can help you dealing with health values depending on variable max health stat.
  8. There's one more parameter you could be interested in: onVehicleStartEnter player enteringPlayer, int seat, player jacked, int door
  9. I changed thePlayer -> thePlayerName, and then added thePlayer as player-type variable. There was a variable called "p", that i couldn't find in the code, so i replaced with the name of the player. I also replaced the table concats... yet i don't know what you want to do with them so maybe it's better to re-use the old code. function setAdminRanks(theAdmin, cmd, thePlayerName, rank) local acc = getAccountName(getPlayerAccount(theAdmin)) local thePlayer = getPlayerFromName( thePlayerName ) --replace the name (a string) with the player element if not thePlayer then
  10. other is not a valid player name, so local otherPlayer = getPlayerFromName(other) is false, so getPlayerMoney(otherPlayer) + amount is getPlayerMoney(false) + amount, which should also throw a warning. Just checked really fast, so i'm sorry if i said something wrong.
  11. HelloWorld(ArgumentsHere) The arguments are the data processed by the function. You mentioned functions with a parameter called "thePlayer". The name suggests* that the function accept a player-type variable, and therefore performs actions on that player/using that player data. *Suggest: Arguments names are just something to recognise that parameter. It's not a type or whatever. If you called that "foo" or "someVariableNameChosenRandomly" and rename all the reference of that variable inside the function then no difference is made. Names are used to let humans understand easily the co
  12. @2kristof2... what koragg said is valid, but the fact the archive can't be writted (edited) makes me thing the server is running and is using that resource (have some file of it open) Check the script when you can to make sure everytime you open a file you also close it. EVERYTIME you open: you close in EVERY case. That could be why the server keeps some file opened. (to edit the resource you may need to start/stop/restart multiple time, or shutdown the server)
  13. There's something weird car= getPedOccupiedVehicle ( thePlayer ) if isPedInVehicle( thePlayer ) then --this generates warning but getPedOccupiedVehicle don't??? are you sure this is the correct line? Also: Expected bool at argument 5 Copying pasting from wiki the 5th arg serverside is int b=176 so an integer. The correct syntax (for your clientside script) is: bool outputChatBox ( string text [, int r=231, int g=217, int b=176, bool colorCoded=false ] )
  14. Did you try to change drag? Also note that helicopters and boats use additional handling data, which is not editable with MTA functions, so if some "limits" are in that code... Note: i'm not an handling expert and probably other more experienced people can give you further help with this.
×
×
  • Create New...