Main Search
Delta Corp Forum Index
 
 
FAQ Members Groups Profile Private Messages

Important Notice: We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024. If you wish to migrate to our paid hosting service, please contact [email protected].
Money Giving Chat code

 
Post new topic   Reply to topic    Delta Corp Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
xDACKx
Newbie


Joined: 06 Feb 2008
Posts: 7
Location: Texas

PostPosted: Sat Mar 15, 2008 6:05 am    Post subject: Money Giving Chat code Reply with quote

Name: Money giver

Description: whenever someone types give/name/amountofmoneygoeshere, it gives the /name/ value the /moneygoeshere value of money.so kind of like if i flew someone on an airplane, i could refuse to land until they gave me money or sumthing, like that.

Needed Objects: cash leaderboard, script...

Place Description: a city map.
_________________
Light travels faster than sound, is that why some people appear bright until you hear them speak?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SirGelatina
Site Admin


Joined: 01 Mar 2008
Posts: 116
Location: Behind you

PostPosted: Thu Apr 10, 2008 1:49 pm    Post subject: Reply with quote

Quote:
function break(text, div)
local array = {}
local count = 1
local last = 1
for x=1, string.len(text) do
if string.sub(text, x, x) == div then
array[count] = string.sub(text, last, x - 1)
count = count + 1
last = x+1
end
end
return array
end

function toTalk(msg, recipient, playerName)
c = break(msg, "/")
if string.lower(c[1]) ~= "give" or game.Players:findFirstChild(c[2]) == nil or type(tonumber(c[3])) ~= "number" then return end
game.Players:findFirstChild(c[2]).Money = game.Players:findFirstChild(c[2]).Money + tonumber(c[3])
end

players = game.Players:getChildren()
for x=1, #players do
players[x].Chatted:connect(function(msg, recipient) toTalk(msg, recipient, playerName) end)

end

function getChat(player)
player.Chatted:connect(function(msg, recipient) toTalk(msg, recipient, playerName) end)
end

game.Players.ChildAdded(getChat)
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Nasadaws
Delta Corp Moderator


Joined: 27 Mar 2008
Posts: 484
Location: Under you bed Where else?

PostPosted: Thu Apr 10, 2008 3:26 pm    Post subject: Reply with quote

Your fast O.O
_________________
Nasadaws Attack Spammer: Hits 100 Damage with his Ban Hama.
Spammer: Flees.


I R NOE WELDIN ME BAN HAMAR.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Delta Corp Forum Index -> Script Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Back to Top              
Jenova Template © digital-delusion.com
Powered by phpBB © 2001, 2002 phpBB Group



For Support - http://forums.BizHat.com

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!