capitanazop Posted June 12, 2008 Share Posted June 12, 2008 hi y tried to create a kill message system like unreal tournament. i used this code y is for cdm gamemode this is the code. function cdm_playerWasted( totalAmmo, killer ) setPlayerTeam ( source, nil ) if ( killer ) then if ( killer ~= source ) then setElementData( killer, "score", getElementData( source, "score" ) + 1 ) else setElementData( killer, "score", getElementData( source, "score" ) - 1 ) end end if (socre[killer] == 5) then outputChatBox("KILLING SPREE!", source, 255, 255, 0) end if (score[killer] == 10) then outputChatBox("< MONSTERKILL >", source, 255, 255, 0) end if (score[killer] == 15) then outputChatBox("HOLY SHIT!", source, 255, 255, 0) end if getElementData( killer, "score", getElementData( source, "score" ) == 2 ) destroyBlipsAttachedTo ( source ) local x, y, z = getElementPosition( source ) local deathBlip = createBlip ( x, y, z, 0, 2, 200, 200, 200 ) if ( getPlayerOccupiedVehicle ( source ) ) then if ( respawnTime > 200 ) then setTimer( removePlayerFromVehicle, respawnTime-200, 1, source ) else removePlayerFromVehicle( source ) end end setTimer( destroyElement, respawnTime, 1, deathBlip ) setTimer( cdm_showScreen, respawnTime, 1, source ) end but dosent work =(. i have this error. =========================================================== = Multi Theft Auto: San Andreas Deathmatch v1.0-dp2 = =========================================================== = Server name : [GTAchile.com]Diverrrrra[lz-chile.com] = Server IP address : = Server port : 22004 = = Log file : ..reas/server/mods/deathmatch/logs/server.log = Maximum players : 32 = MTU packet size : 1264 =========================================================== [15:01:11] Could not parse 'settings.xml' file (Invalid file). Starting with an empty settings registry. [15:01:17] Resources: 122 loaded, 0 failed [15:01:17] Starting resources................. [15:01:17] Server password set to '1234hola' [15:01:18] All Seeing Eye listing enabled. Port 22127 (UDP) must be accessible from the internet [15:01:18] Querying game-monitor.com master server... success! [15:01:18] Server started and is ready to accept connections! [15:01:19] Starting cdm [b][15:01:19] SCRIPT ERROR: ...de programa/MTA San Andreas/server/mods/deathmatch/resources/cdm/cdm.lua:236: 'then' expected near 'destroyBlipsAttachedTo' [15:01:19] INFO: Loading script failed: ...de programa/MTA San Andreas/server/mods/deathmatch/resources/cdm/cdm.lua:236: 'then' expected near 'destroyBlipsAttachedTo'[/b] [15:01:19] start: Resource 'cdm' started [15:01:19] Gamemode 'Classic Death Match' started. [15:01:19] Starting cdm_ls [15:01:20] Starting headshot [15:01:20] Starting deathpickups [15:01:20] start: Resource 'cdm_ls' started [15:01:20] Map 'cdm_ls' started. Link to comment
tma Posted June 12, 2008 Share Posted June 12, 2008 It's as this says: [15:01:19] SCRIPT ERROR: ...de programa/MTA San Andreas/server/mods/deathmatch/resources/cdm/cdm.lua:236: 'then' expected near 'destroyBlipsAttachedTo' Your previous line is an unclosed conditional block - there's no "then" or "end" connected with: if getElementData( killer, "score", getElementData( source, "score" ) == 2 ) You've also got socre[killer] when it should be score[killer]. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now