Jump to content

bad argument giveweapon


Recommended Posts

Posted (edited)

client side script

triggerServerEvent("onColtRequest",localPlayer) 

server script

function coltSend(thePlayer) 
giveWeapon(thePlayer,22,200) 
end 
addEvent("onColtRequest",true) 
addEventHandler("onColtRequest",root,coltSend) 
  

how do i fix this stupid problem?

oh and yeah i just want this to send weapon to one player,not everyone but i have no idea how to fukin do this because everything is too hard

Edited by Guest
Posted
function coltSend(client) 

Remove 'client' from there.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Just the one who triggered the event.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Ah, he edited the script, the original was using 'client' which is also a pre-defined variable like 'source' when triggering events.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

That's what I read aswell, so I guess is safer.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

i forgot to re-re-edit my topic,sorry i was using client and it worked out but i was confused whether it would give the gun to everybody or just that 1 player who triggered event because of:

The client class represents any client that is connected to the server.

anyway thanks guys it works

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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