Jump to content

Ped help


Zalmon

Recommended Posts

Okay, I want all of these peds to be headless and onfire.. I get an error "bad arguemnet @line 13"

line 13 is the line that checks if they're headless or not.

myZombies = { } 
zomb1 = createPed ( 0, 3340.4311523438, -1166.7451171875, 1077.25390625 ) 
zomb2 = createPed ( 0, 3341.4311523438, -1166.7451171875, 1077.25390625 ) 
zomb3 = createPed ( 0, 3342.4311523438, -1166.7451171875, 1077.25390625 ) 
zomb4 = createPed ( 0, 3343.4311523438, -1166.7451171875, 1077.25390625 ) 
zomb5 = createPed ( 0, 3340.4311523438, -1167.7451171875, 1077.25390625 ) 
zomb6 = createPed ( 0, 3298.4875488281, -1209.2786865234, 1077.25390625 ) 
zomb7 = createPed ( 0, 3298.4875488281, -1208.2786865234, 1077.25390625 ) 
zomb8 = createPed ( 0, 3298.4875488281, -1207.2786865234, 1077.25390625 ) 
zomb9 = createPed ( 0, 3298.4875488281, -1206.2786865234, 1077.25390625 ) 
zomb10 = createPed ( 0, 3298.4875488281, -1205.2786865234, 1077.25390625 ) 
    function onStart() 
    for k, ped in pairs( myZombies ) do 
         head = isPedHeadless(ped) 
         if head ~= true then 
    setPedOnFire(ped, true) 
    setPedHeadless(ped, true) 
               end 
            end 
        end 
end 
addEventHandler("onResourceStart", resourceRoot, onStart) 

Link to comment
myZombies = { 
zomb1 = createPed ( 0, 3340.4311523438, -1166.7451171875, 1077.25390625 ), 
zomb2 = createPed ( 0, 3341.4311523438, -1166.7451171875, 1077.25390625 ), 
zomb3 = createPed ( 0, 3342.4311523438, -1166.7451171875, 1077.25390625 ), 
zomb4 = createPed ( 0, 3343.4311523438, -1166.7451171875, 1077.25390625 ), 
zomb5 = createPed ( 0, 3340.4311523438, -1167.7451171875, 1077.25390625 ), 
zomb6 = createPed ( 0, 3298.4875488281, -1209.2786865234, 1077.25390625 ), 
zomb7 = createPed ( 0, 3298.4875488281, -1208.2786865234, 1077.25390625 ), 
zomb8 = createPed ( 0, 3298.4875488281, -1207.2786865234, 1077.25390625 ), 
zomb9 = createPed ( 0, 3298.4875488281, -1206.2786865234, 1077.25390625 ), 
zomb10 = createPed ( 0, 3298.4875488281, -1205.2786865234, 1077.25390625 ) 
} 
function onStart() 
     for k, ped in pairs( myZombies ) do 
         head = isPedHeadless(ped) 
          if head ~= true then 
               setPedOnFire(ped, true) 
               setPedHeadless(ped, true) 
          end 
     end 
end 
addEventHandler("onResourceStart", resourceRoot, onStart) 

Link to comment

your original script didn't add the zombies to the table, so your script was checking an empty table.

btw, i dunno if it matters, but it might be a good idea to use a different table name if your adding that to the zombie resource (myzombies is the name of the table that is used to list the zombies that are chasing a player)

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