Jump to content

[HELP]Zombie Gamemode By:Stryp


oversapogi

Recommended Posts

https://community.multitheftauto.com/index.php?p=resources&s=details&id=2405

Gamemode works fine only weapon didn't save after relogin... anyone can help me..? :)

Edit:

Other one the zombie didn't attack human they are free kill... Stryp using Slothman Zday I think there's an update of his script, i need help for this...

I can't find Stryp post and i can't search him so i make a new thread.

Hoping Stryp release a new update of this... :roll:

Edited by Guest
Link to comment
You can use this simple script I made: http://www.mediafire.com/?lqq6gnd2hh8q54b

thanks Solidsnake14 still nothing happens when i die the guns still gone... xD

i think there's need to edit here in spawn.lua by B!ERPuNK:

--[[  
P-spawn by B!ERPuNK 
Edited and added starting mission 
  
Thanks B!ERPuNK. 
]]-- 
function afterLogin(p) 
setTimer(function(p) 
    local source = p 
    local account = getPlayerAccount(source) 
    if barracks and homeBlip then  
        destroyElement(barracks)  
        destroyElement(homeBlip)  
        barracks, homeBlip = nil, nil 
    end 
    if showMarker then 
        destroyElement(showMarker) 
        showMarker = nil 
    end 
    if not getAccountData(account,"tutorial") then 
        spawnPlayer(source,2848.1442871094,-2353.46875,20) 
        setCameraTarget(source) 
        fadeCamera(source,true,5) 
        showMarker = createMarker(0,0,0,"checkpoint",0.5,0,0,255,10,source) 
        setMarkerTarget(showMarker,2783.9313964844, -2417.5051269531, 13.634605407715) 
        attachElements(showMarker,source,0,0,-2) 
        outputChatBox("You need to #ff0000escape #ffff00from this ship, its #ff0000infected!",source,255,255,0,true) 
        outputChatBox("Follow the #009affarrow #ffff00and leave the #ff0000ship!",source,255,255,0,true) 
        giveWeapon(p,22,200,true) 
        -- Some zombies to give the player a little difficulty 
        createZombie(2827.2592773438, -2351.7189941406, 19.205839157104) 
        createZombie(2838.8562011719, -2345.6728515625, 19.205837249756) 
        createZombie(2827.9130859375, -2361.0776367188, 22.798677444458) 
        createZombie(2833.7160644531, -2355.1584472656, 26.893081665039) 
        createZombie(2825.9729003906, -2370.8776855469, 28.681663513184) 
        createZombie(2827.2592773438, -2351.7189941406, 20.205839157104) 
        createZombie(2838.8562011719, -2345.6728515625, 202058372497560) 
        createZombie(2827.9130859375, -2361.0776367188, 23.798677444458) 
        createZombie(2833.7160644531, -2355.1584472656, 23.893081665039) 
        createZombie(2825.9729003906, -2370.8776855469, 29.681663513184) 
    else 
        afterLoginNoTut(source) 
    end 
end,500,1,p) 
end 
  
function goToSafehouse(p) 
if not isElement(p) or getElementType(p) ~= "player" then return end 
if not getElementData(p,"entered") and not getAccountData(getPlayerAccount(p),"tutorial") then 
barracks = createVehicle(433,2783.9313964844,-2417.5051269531,14,0,0,90,"ESCAPE") 
setMarkerTarget(showMarker,2505.6860351563, -1684.3099365234, 13.546875) 
outputChatBox("Successfully escaped from the ship! Now go #009900home.",p,255,255,0,true) 
homeBlip = createBlip(2495.3813476563, -1691.1353759766, 14.765625,31,2,255,0,0,255,1234,1000,p) 
setElementData(p,"entered",true) 
attachElements(showMarker,p) 
end 
end 
addEventHandler("onColShapeHit", createColRectangle(2774.9299316406, -2429.623046875,26.501953125,23.681640625), goToSafehouse) 
  
function gotToSafehouse(p) 
if not isElement(p) then return end 
if getElementType(p) ~= "player" or not getElementData(p,"entered") or getAccountData(getPlayerAccount(p),"tutorial") then return end 
triggerClientEvent(p,"missionCompleted",getRootElement()) 
outputChatBox("Mission completed successfully. Congratulations, you came #009900home!",p,255,255,0,true) 
outputChatBox("The vehicle will be destroyed now. Also, you will get 5 EXP for completing this mission.",p,255,255,0) 
destroyElement(showMarker) 
destroyElement(homeBlip) 
setTimer(destroyElement,5000,1,barracks) 
showMarker = nil 
homeBlip = nil 
setTimer(function() barracks = nil end,5500,1) 
local account = getPlayerAccount(p) 
setAccountData(account,"tutorial",true) 
local old = getAccountData(account,"zombies.kills") or 0 
setAccountData(account,"zombies.kills",old+5) 
triggerClientEvent(p,"expOnChange",getRootElement(),old+5,5) 
end 
addEventHandler("onColShapeHit", createColRectangle(2480.3623046875, -1689.3347167969,25.6303711,30.8875732),gotToSafehouse) 
  
--[[  
From this, its the normal spawn and onLogin event  over this thats the tut 
And i dont know why i write notes to myself in english. 
Tehⴠez felett van a tutori⭯s cucc, ez alatt a norm⭩s login meg wasted ut⮮ 
]]-- 
  
function spawnOnDead(ammo, killer, weapon, bodypart) 
    local account = getPlayerAccount(source) 
    local x,y,z = getElementPosition(source) 
    if z < 1 then fadeCamera(source,false,1,0,0,20) else fadeCamera(source,false,1,150,0,0) end 
    if not getAccountData(account,"tutorial") then afterLogin(source) return end 
    givePlayerMoney(source, 1000) 
    setTimer(giveWeapon,2500,1,source,22,68,true) 
    if killer and getElementType(killer) == "player" then  
        takePlayerMoney(killer, 50000) 
    end 
    fadeCamera(source,true,2) 
    setTimer(spawnPlayer,1500,1,source,2489.6762695313+math.random(-5,5),-1668.9534912109+math.random(-5,5),13.5) 
end 
  
function afterLoginNoTut(source) 
    local outside = getElementData(source,"outside") 
    if outside == true or outside == 2 then 
        spawnPlayer(source,2301.9077148438, -1632.7995605469, 15.3) 
        if outside == 2 then 
            for i=1,10 do  
                createZombie(2299+i,-1659,155)  
            end 
        end 
    removeElementData(source,"outside") 
        spawnPlayer(source,2489.6762695313+math.random(-5,5),-1668.9534912109+math.random(-5,5),13.5) 
    end 
    setCameraTarget(source) 
    fadeCamera(source,true,2) 
end 
  
  
addEventHandler("onPlayerLogin", getRootElement(), function() afterLogin(source) end) 
addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead) 

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