Jump to content

Problem with giveWeapon


Recommended Posts

I would when i make /fskin that i get weapons!

(It´s from the Godmother script)

Error

[10:26:10] WARNING: Godmother\Fraktionen\Mafia\russia.lua:17: Bad argument @ 'gi

veWeapon'

function fskin(thePlayer)

local fac = getElementData(thePlayer,"Fraktion")

local rank = getElementData(thePlayer,"Rank")

if (fac == 9) then

if (rank == 0) then

setElementModel(thePlayer, 125)

elseif (rank == 1) then

setElementModel(thePlayer, 127)

elseif (rank == 2) then

setElementModel(thePlayer,126)

elseif (rank == 3) then

setElementModel(thePlayer,126)

elseif (rank == 4) then

setElementModel(thePlayer,120)

elseif (rank == 5) then

setElementModel(thePlayer,124)

giveWeapon ( theplayer, 31, 200 )

end

end

end

addCommandHandler("fskin", fskin)

Sorry for my bad English, ertlflorian1

Link to comment
Where you see giveplayer?

Please post it with the errors corrected ;)

eAi is not your slave :P. He and the error message have given you enough information to find your mistake:

Godmother\Fraktionen\Mafia\russia.lua:17

This is not only the path and filename of the file where the error is in, behind the colon it tells you the line number!

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