Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to give a player cash using a chat command?

Asked by 4 years ago

I'm making chat commands for my game and I was wondering how I would make a chat command like ":givecash deathmaster607 532" but I don't know how to go past the player's name in the message to get to the number since I don't know how many characters they have in their name. (if that makes any sense)

Please help me if you know how!

1 answer

Log in to vote
0
Answered by
WN0820 11
4 years ago
Edited 4 years ago

deathmaster607 you dont need to do that there is already something like that build if you click esc then go settings scroll down and go to developer console click on server and type in game.Players.deathmaster607.leaderstats.cash.Value = 532

if this is what you were looking for use it and if you wanna reset peoples stats or something they need to be in the game

game.Players.(Players Name).(The Stat of leaderstats).(Currency).Value = amount

0
Not all of my admins have access to the Console. I'm adding this chat command so that any admin can use it, not just the ones that have access to the console. QuantumPlasmic 84 — 4y
0
oh i understand you could of said it then I can help you with that though WN0820 11 — 4y
0
Mainly People would use admin or other people would search it up WN0820 11 — 4y
0
I'm trying not to use free models in my game and all the videos I look at don't tell me how to give players besides myself cash QuantumPlasmic 84 — 4y
View all comments (2 more)
0
oh ok that makes sense WN0820 11 — 4y
0
admin isnt really a free model most people use it but okay youtube most tell you answer like most of the videos should if i search it up ill probably have stuff popped on WN0820 11 — 4y
Ad

Answer this question