Jump to content

Cyanide

Members
  • Posts

    18
  • Joined

  • Last visited

Details

  • Location
    Ontario, Canada

Cyanide's Achievements

Square

Square (6/54)

1

Reputation

  1. → About Cyanide's Gang Spray/Tag System was inspired by GTA:SA mission Tagging Up Turf. A summary of the link is that Sweet and CJ find multiple Ballas tags and over-spray them with their families' tag. This is my first release, and in my opinion it's a bit cheesy. Everyone improves. This version is much more accurate than my SA:MP version of this system. Which is found here (click me) → Features Ability to select your own spray. Anti-Spraying Spam User Friendly spray selection. ( /selecttag ) → Possible Questions Ask further questions here. How do I spray? You can create a spray by firing a spray-can at a close range by a wall. How do change my spray? You can change your spray by using the command /selecttag → Useful Functions OnClientEditSpray -- Called when a player finishes the object rotation after spraying. OnClientCreateSpray -- Called when a player creates a spray. OnClientDeleteSpray -- Called when a player decides to delete the spray he was creating → Images → Community Download Click me → Other Notes The code is very sloppy in my honest opinion. I believe the MTA version of my spray system is twice as better as my SA:MP release version. Enjoy.
  2. Server: function sql_query( ... ) executeSQLQuery( ... ) end addEvent( "sql_query", true ) addEventHandler( "sql_query", getRootElement(), sql_query ) Client: function OnPlayerJoinServer( ) triggerServerEvent( "sql_query", root, ... ) end addEventHandler("onClientPlayerJoin", getRootElement(), OnPlayerJoinServer ) The triple dots represent parameters. You can also check out the wiki's example.
  3. Since it's only a server-side function, you will need to use triggerServerEvent.
  4. It still doesn't work. The object doesn't face me when I'm at certain angles.
  5. getPedRotation returns one variable, and that is the rotation of the player. That definitively wouldn't work. The code in the comments is called Trigonometry.
  6. Hey, I'm trying to allow someone to shoot a object and it would rotate to them so the facing side would look away from the wall. Example: A fish shooting script, and the fish point towards you! Everything seems to work but depending on angle the object would lean to much on one side and cause the object to not exactly point at the player. Here's the script below, I commented all my attempts to figure this out. Anyone notice anything wrong? local a = getPedRotation( source ) --x = x + distance * math.sin( -ax ) * 180 / math.pi --y = y + distance * math.sin( -ay ) * 180 / math.pi --z = z + distance * math.sin( -az ) * 180 / math.pi --local rx = x + math.sin (math.rad(-a)) * distance --local ry = y + math.cos (math.rad(-a)) * distance --local r = a + 90.0 createObject ( object, hitX, hitY, hitZ, 0, 0, a + 90 )
  7. I did however plan on a avatar feature, but I decided to let it go because of exactly what qaisjp said in his recent message. I decided to just leave it as just a normal picture for the design of the profile. It may be useless for people who don't find this exactly interesting. I imagine using this maybe to get a community closer and knowing each other more by public profiles. (Besides forum profiles of course)
  8. → About Player Profile System's name explains itself. The profile system allows players to edit their public profile for others to view. This is my first release in Multi Theft Auto. I wouldn't be surprised by the critism of how I coded certain features. Please correct me if you notice anything wrong in my coding. → Features SQLite based system. Searching ability. Sounds related to profile events. Profile secured by name, ip address, and serial. Ability to modify bind settings. → Possible Questions Ask further questions here. How do I change the bind from F6 to another bind (Ex: F1)? You can change the bind by opening meta.xml and changing line 34. A example is below: "F6" /> to "F1" /> How do I change my profile information? You can open up the menu with either your bind or /profile and click the button "View My Profile". There will be a "Edit" button on the top right! How do I manually remove / edit someone elses profile? Possibly in future versions, I will release a administrator addon to the profile system. For now you can edit the profiles by using a SQLite manager ( Recommendation: Navicat ) → Screenshots ( Click for full size ) → Community Download Click me → Other Notes Feel free to edit the resource, but please keep the credits located inside the resource files. It may be difficult to edit / read because the way I coded it. I have trouble reading LUA codes only out of any other language for some strange reason.
  9. Try using SetElementCollidableWith.
  10. @Aibo - Great! Thanks for the explanation. I seem to be a bit PAWN stiff. Edit: The problem has been solved.
  11. Thanks alot, it's fixed now. But why did it only work when I put local behind all variables I wanted to create. I was able to function properly without them before until now. Also, the fix caused another problem where returnProfileInformation isn't being called anymore, and a error prints in console . The line of this code is located in another LUA file that calls the client function, so that can be a explanation why it isn't being called. The code for the server LUA is below: function getProfileInfo( name, selection ) local returnValue returnValue = executeSQLSelect ( "profiles", selection, "username = '" .. name .. "'", 1) triggerClientEvent ( "returnProfileInformation", getRootElement(), name, returnValue[ 1 ][selection] ) end The line is located in triggerClientEvent. The code used to work until I used the updated code in your post. This caused a problem before, any clue?
  12. I wont post the whole code, here's it broken down into important snippets. local Profile_Window, Profile_Cancel, Profile_Search, Profile_Label, Profile_image, Profile_SearchB, Profile_ShowProfile, Profile_ShowProfile_Label, Profile_ShowProfile_Avatar, Profile_ShowProfile_Like, Profile_ShowProfile_Cancel, Profile_Data = { } -- code function returnProfileInformation( name, value ) outputChatBox( name ) outputChatBox( value ) Profile_Data[ name ] = value outputChatBox( "I have been called!" ) end
  13. I did use that, Profile_Data is defined as a array/table, exactly how you created it in your code.
  14. Yes it is created, debugscript 3 is enabled also. The function cancels (stops) when the array is attempted to be set.
  15. How exactly can arrays be used with parameters in functions? This code: function returnProfileInformation( name, value ) outputChatBox( name ) outputChatBox( value ) Profile_Data[ name ] = value outputChatBox( "I have been called!" ) end is a example of what I'm trying to do. The parameter name is "Cyanide", and the other parameter is "44". From my debug, line 5 isn't being called because line 4 cancels the event.
×
×
  • Create New...