Jump to content

[RESOLVED] Turret


Wisam

Recommended Posts

Hey, i needed some help in this turret script.. i added a price for the turret (20000) first and it kinda worked but when the player have 0$ money he can buy a turret but his money become negative and he can keep buying, so i added:

RESOLVED AND DELETED

Edited by Guest
Link to comment
@Wisam someone else has stolen your script

We're here to help people with their scripts, not steal them.

Change your code to this:

addCommandHandler("turret", 
        function (player) 
                local x,y,z = getElementPosition(player) 
                if (getPlayerMoney(player)>= 10) then 
                    triggerClientEvent(root, "turret", root,player, x, y, z) 
                    takePlayerMoney(player,10) 
                    outputChatBox("You Bought a Turret for $20.000", source, 0,190,50)  
                else outputChatBox("You Don't have enough money to buy a Turret", source, 190,0,50) 
                
                end 
        end     
) 
  
addCommandHandler("dturret", 
        function (player) 
        triggerClientEvent(root, "destroy", root, player) 
        outputChatBox("You Destroyed you're turret", getRootElement(), 190,0,50) 
        end 
) 

Edited by Guest
Link to comment
@Wisam someone else has stolen your script

We're here to help people with their scripts, not steal them.

@Wisam, can you please activate /debugscript 3, take a screenshot of it and post it here? Thanks.

his name is emmanuel has uploaded his script check community.multitheftauto.com

iam not stolen it -_-

Link to comment
@Wisam someone else has stolen your script

We're here to help people with their scripts, not steal them.

@Wisam, can you please activate /debugscript 3, take a screenshot of it and post it here? Thanks.

his name is emmanuel has uploaded his script check community.multitheftauto.com

iam not stolen it -_-

Ah right, sorry. I didn't see that, I'll go head and ask SolidSnake14 to remove it.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...