Jump to content

Frequency

Members
  • Posts

    10
  • Joined

  • Last visited

Details

  • Gang
    Cherry Poppers

Recent Profile Visitors

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

Frequency's Achievements

Member

Member (5/54)

0

Reputation

  1. I don't get it, I thought you disliked SA-MP? Why destroy a thing of beauty?
  2. Ok. Thanks for all your help, you have all been invaluable resources.
  3. Ah, thank you for clearing that up. I will assume that I will need to clean up the element in the array in which I would want to be using? If I were to do this, would I set it's value to nil, or give it a value of zero? I understand the array can't have any more than 999 elements (1-1000), and if the script was getting different clients on and off, it could possibly exceed this limit if the values weren't cleaned up. Thanks in advance.
  4. Thanks for your reply driver2. I am not trying to fill an array with a list of players as such, rather fill an array with a boolean value for each possible player. The boolean value will determine whether the player could perform a specific task, such as using a bind. Is there an example or alternative method out there?
  5. Anti-Minigun Stop unwanted minigun users on your server! function removeMinigun ( previousID, newID ) if newID == 38 then takeWeapon(getRootElement(), 38 ) end end addEventHandler ( "onClientPlayerWeaponSwitch", getRootElement(), removeMinigun )
  6. Hi, may I ask what about what the standard way to con a player data array ? For instance, the following will declare an array and make it grow, I've set it to go to the maximum player count. -- The player array variable. plrArray = {} -- Make the array grow according to the maximum amount of players on the server. for i=1, getMaxPlayers() do plrArray[i] = 0 end But, I have got into the prediciment where I don't know how I'd be able to get a playerid. Does playerid exist in MTA, or is it just source? If it's just source, how would I implement it as to getting player specific data? I'd rather it not require an account system. Thanks in advance.
  7. Woo! It's very nice, thanks for releasing it, its been a long wait but a great reward.
  8. I didn't see any other collaborative snippet dipository, so I thought here would probably be the most appropriate place to post. With this aside, post your useful snippets here! They could be funny, wacky, interesting, useful for other scripters, or all of the above?! Let your imagination roll. Please try to keep this topic as clean as possible. That means, refrain from getting off-topic, refrain from posting snippets already provided, and refrain from not complying to the forum rules! Ensure you have fully commented your code too (this is nessesary, as this is supposed to be an educational experience too ). I'll get the ball rolling: Simple Key Binder This snippet allows users on your server to create binds for their keys, to display text in the chat window. -- The bind parser. function parseSayBind ( source, key, keyState , cmd, say) -- Send all clients a message in the chatbox, with the user's nick and binded text. outputChatBox ( getClientName ( source ) .. ": " .. say) end -- The command parser function bindSay ( source , cmd , key, say) -- Check to see if the command has correct parameters. if not key or not say then -- Tell the player he/she has entered the command incorrectly. outputChatBox ( "/bindsay [key] [text]", source, 255, 0, 0 ) return 1 end -- Set the key to be binded. bindKey ( source, key, "down", parseSayBind , cmd, say) end -- /bindsay [key] [text] addCommandHandler ( "bindsay", bindSay )
  9. Scoose me, don't be rude you spoilt brat. They'll release it their own time, not yours.
×
×
  • Create New...