Jump to content

can any Fix My Script Pleae Enter Here if you can


^Dev-PoinT^

Recommended Posts

Posted

Hi all i have made War_System By onPlayerWasted Function

See

ClientSide ...

outputChatBox("War_System|x[Dev-PoinT]x!",root,255,255,0) 
function xxx (ammo, killer, killerweapon, bodypart ) 
    if (killer) and (killer ~= source ) then 
      giveWeapon ( killer, 39, 2, true ) 
      local sound = playSound("sounds/Siren.mp3") 
    setSoundVolume(sound, 0.5) 
    outputChatBox(getPlayerName(killer) .." has Now a Special Weapon, watch out!", getRootElement(), 255, 255, 0) 
    end 
end 
addEventHandler ("onPlayerWasted",getRootElement() , xxx) 
  
function outputWantedLevel () 
local wantedLvl = getPlayerWantedLevel ( ) 
   if wantedLvl == 0 then 
      outputChatBox ( "You clean", 0, 255, 0) 
   else 
      outputChatBox ( "You have "..wantedLvl.." Wanted stars!", 255, 0, 0) 
   end 
end 
addEventHandler ( "onResourceStart", getRootElement(), outputWantedLevel ) 

ServerSide....

function xxx ( thePlayer )  
   setPlayerWantedLevel ( thePlayer, 3 ) 
   outputChatBox ( getPlayerName ( thePlayer ) .. "is Wanted Kill him For Special weapons" ) 
end 
addEventHandler ("onPlayerWasted",getRootElement() , xxx) 

Posted (edited)
addEventHandler ( "onResourceStart", getRootElement(), outputWantedLevel ) 

onResourceStart is this client?!

addEventHandler ("onPlayerWasted",getRootElement() , xxx) 

onPlayerWasted is this client?!

giveWeapon ( killer, 39, 2, true ) 

giveWeapon is this client?!

------------------------------------

outputChatBox(getPlayerName(killer) .." has Now a Special Weapon, watch out!", getRootElement(), 255, 255, 0) 

also getRootElement() is only server side

_-------------------------------------------_

local wantedLvl = getPlayerWantedLevel ( ) 

wtf is this? copy past example from wiki :o

Edited by Guest
Posted (edited)

Hope this works Try. this for the Client And see if it will work.

outputChatBox("War_System|x[Dev-PoinT]x!",root,255,255,0) 
function xxx (ammo, killer, killerweapon, bodypart ) 
    if (killer) and (killer ~= source ) then 
      giveWeapon ( killer, 39, 2, true ) 
      local sound = playSound("sounds/Siren.mp3") 
    setSoundVolume(sound, 0.5) 
    outputChatBox(getPlayerName(killer) .." has Now a Special Weapon, watch out!", getRootElement(), 255, 255, 0) 
    end 
end 
addEventHandler ("onClientPlayerWasted",getRootElement() , xxx) 
  
function outputWantedLevel () 
local wantedLvl = getPlayerWantedLevel ( ) 
   if wantedLvl == 0 then 
      outputChatBox ( "You clean", 0, 255, 0) 
   else 
      outputChatBox ( "You have "..wantedLvl.." Wanted stars!", 255, 0, 0) 
   end 
end 
addEventHandler ( "onClientPlayerWasted", root, outputWantedLevel ) 
  

Edited by Guest
Posted
Ignition, giveWeapon are server only functions.

Solidsnake Could i try the triggerServerEvent function in place of giveWeapon and add the event giveWeapon Server side? if you get what i mean?

Posted

Alright i think I have it now. Still a bit new to scripting but i think i Have it now. Here,

Client side

outputChatBox("War_System|x[Dev-PoinT]x!",root,255,255,0) 
function xxx (ammo, killer, killerweapon, bodypart ) 
    if (killer) and (killer ~= source ) then 
      triggerServerEvent ( "giveWeapon", getLocalPlayer(thePlayer) 
      local sound = playSound("sounds/Siren.mp3") 
    setSoundVolume(sound, 0.5) 
    outputChatBox(getPlayerName(killer) .." has Now a Special Weapon, watch out!", getRootElement(), 255, 255, 0) 
    end 
end 
addEventHandler ("onClientPlayerWasted",getRootElement() , xxx) 
  
function outputWantedLevel () 
local wantedLvl = getPlayerWantedLevel ( ) 
   if wantedLvl == 0 then 
      outputChatBox ( "You clean", 0, 255, 0) 
   else 
      outputChatBox ( "You have "..wantedLvl.." Wanted stars!", 255, 0, 0) 
   end 
end 
addEventHandler ( "onClientPlayerWasted", root, outputWantedLevel ) 
  

Server side.

addEvent ( "giveWeapon", true ) 
function givew (thePlayer) 
    giveWeapon ( killer, 39, 2, true ) 
end 

Posted

server side

addEventHandler("onResourceStart",resourceRoot,  
outputChatBox("War_System|x[Dev-PoinT]x!",root,255,255,0) 
end) 
  
function xxx (ammo, killer, killerweapon, bodypart ) 
if (killer) and (killer ~= source ) then 
    giveWeapon ( killer, 39, 2, true ) 
    triggerClientEvent ( root, "StartSiren", root ) 
    outputChatBox(getPlayerName(killer) .." has Now a Special Weapon, watch out!", root, 255, 255, 0) 
    end 
end 
addEventHandler ("onPlayerWasted", root, xxx) 

Client side

function StartSound () 
    local sound = playSound("sounds/Siren.mp3") 
    setSoundVolume(sound, 0.5) 
end 
addEvent( "StartSiren", true ) 
addEventHandler( "StartSiren", root, StartSound ) 
  
function outputWantedLevel () 
local wantedLvl = getPlayerWantedLevel () 
   if wantedLvl == 0 then 
      outputChatBox ( "You clean", 0, 255, 0) 
   else 
      outputChatBox ( "You have "..wantedLvl.." Wanted stars!", 255, 0, 0) 
   end 
end 
addEventHandler ( "onClientResourceStart", resourceRoot, outputWantedLevel ) 

Posted

The Problem is if any Player died Play The Sound wtf who to Make it if Killer get the wapons

Play The Siren and

outputChatBox(getPlayerName(killer) .." has Now a Special Weapon, Kill Him To Take His weapons!", getRootElement(), 255, 255, 0)

and if the killer died make Pickup with His weapons

iam new in script my knowing is 15%

Posted

i know what you are trying to do and i can make it it's very easy but,

this is not Request Forum Make it By YourSelf!!!!!!!!!!!

start Learn and Stop Copy and Past From Wiki

Posted

Tapl if you great Script Help me or .....

i made 50 % From my script i have This Problem just this and you say dont copy form wiki

when you enter the lua script you was noob in it and Now you great you start insult me?

Posted

when i say for you (this is not Request forum) this mean i start insult you?

wow this what you think?

look up what i give you or what i fix for you

you just put a random code and say fix my script

your script fixed, now you need more thing, but did you try to make these things by yourself?

answer: of course not, you just type your Request in forum without trying anything.

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