Jump to content

[RESOLVED] Turret


Wisam

Recommended Posts

Posted (edited)

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

☣ Plauge Arma II DayZ Mod Server ☣

Here's the link to stay tuned with the server progress and features:

https://forum.mtasa.com/viewtopic.php?f=114&t=96675

Get Ready to play DayZ like you never did before

Posted

Use

if (getPlayerMoney(source)>=20000) then

And tell me the errors.

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

Post the client side code.

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted (edited)
@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
Posted
@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 -_-

USC Informations

Head Staff & Owner Of USC.

Youtube Channel : My Channel

350x20_FFFFFF_FFFFFF_A89999_080404.png

 

Posted
@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.

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...