laserlaser Posted November 21, 2010 Posted November 21, 2010 Hello,this my new function.Really good,and easy.Something useful. Ex use: spawnAllPlayers(x,y,z,"Bikers","laserlaser") ((( Here, it just does not respawn player "Bikers" and player "laserlaser" ))) spawnAllPlayers(x,y,z,[string playerNames ...]) The Function: function spawnAllPlayer(x,y,z,...) local ex = {...} local players = getElementsByType("player") local exPlayer = 0 for k,v in ipairs(players) do exPlayer = 0 for a,c in ipairs(ex) do if tostring(getPlayerName(v)) == tostring(c) then exPlayer=1 end end if exPlayer ~=1 then spawnPlayer(v,x,y,z) end end end - War Of Empire LUA Team -
dzek (varez) Posted November 21, 2010 Posted November 21, 2010 could you please add all of these functions to the wiki instead of posing them here? it will be MUCH better
laserlaser Posted November 21, 2010 Author Posted November 21, 2010 could you please add all of these functions to the wiki instead of posing them here?it will be MUCH better Add there is a very long time.
dzek (varez) Posted November 21, 2010 Posted November 21, 2010 not much longer, but MUCH more helpful. On Scripting section there are people looking for help with their scripts instead of general advices (and they don't search anyway -.-). On wiki - there are scripters that like examples, useful functions. They will search and they can read.
Wojak Posted November 21, 2010 Posted November 21, 2010 You can also create a resource whit all you're functions that exports them (a library resource), and upload it to community
Aibo Posted November 21, 2010 Posted November 21, 2010 could you please add all of these functions to the wiki instead of posing them here?it will be MUCH better you do realise that it is the same function with 2 loops that he exploits over and over and for any purpose (remove accounts, respawn cars, now players)? honestly, i wouldnt want to see this kind of code on the wiki. dude doesnt even know about booleans.
dzek (varez) Posted November 21, 2010 Posted November 21, 2010 better wiki than here. putting this in useful functions (NOT in client/server function list as these aren't build-in functions) won't hurt so much
norby89 Posted November 21, 2010 Posted November 21, 2010 better wiki than here.putting this in useful functions (NOT in client/server function list as these aren't build-in functions) won't hurt so much Better here than wiki or resources. The useful functions page contains what it says, a list of functions that are useful. This is just a simple snippet that 99.99% of scripters won't ever need, and if they do need it for whatever reason, it's so simple that they can probably do it by themselves. No offense to the creator, it's nice of you sharing your scripts but maybe you should try and write stuff that are more general or that address very common problems.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now