Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <mod name="CS War System" version="1.0" author="DJ Death" contact="Opentibiadev.net" enabled="yes">
- <config name="cswar_settings"><![CDATA[
- sv = {
- ctid = 19570,
- tfid = 19571
- }
- outfit = {
- re = {lookType = 134, lookHead = 126, lookBody = 126, lookLegs = 126, lookFeet = 126},
- gre = {lookType = 134, lookHead = 132, lookBody = 132, lookLegs = 132, lookFeet = 132}
- }
- csteam = {
- de_dust_red = {x = 1080, y = 968, z = 7},
- de_dust_green = {x = 1056, y = 1020, z = 4},
- de_aztec_red = {x = 1281, y = 978, z = 5},
- de_aztec_green = {x = 1289, y = 1057, z = 5}
- }
- ]]></config><!-- CS Change Outfits and add Storages -->
- <event type="login" name="csOutfit" event="script"><![CDATA[
- domodlib('cswar_settings')
- function onLogin(cid)
- if getPlayerPosition(cid) == csteam.de_dust_red or getPlayerPosition(cid) == csteam.de_aztec_red then
- doCreatureChangeOutfit(cid, outfit.re)
- setPlayerStorageValue(cid, sv.ctid, 1)
- elseif getPlayerPosition(cid) == csteam.de_dust_green or getPlayerPosition(cid) == csteam.de_aztec_green then
- doCreatureChangeOutfit(cid, outfit.gre)
- setPlayerStorageValue(cid, sv.tfid, 1)
- end
- return true
- end
- ]]></event><!-- CS Remove Storages on Logout -->
- <event type="logout" name="csLogout" event="script"><![CDATA[
- domodlib('cswar_settings')
- function onLogout(cid)
- if getPlayerStorageValue(cid, sv.ctid) >= 1 then
- setPlayerStorageValue(cid, sv.ctid, -1)
- elseif getPlayerStorageValue(cid, sv.tfid) >= 1 then
- setPlayerStorageValue(cid, sv.tfid, -1)
- end
- return true
- end
- ]]></event><!-- CS Remove Storages on Death -->
- <event type="death" name="csDeath" event="script"><![CDATA[
- domodlib('cswar_settings')
- function onDeath(cid, corpse, deathList)
- if isPlayer(cid) then
- if getPlayerStorageValue(cid, sv.ctid) < 0 then
- setPlayerStorageValue(cid, sv.ctid, -1)
- elseif getPlayerStorageValue(cid, sv.tfid) < 0 then
- setPlayerStorageValue(cid, sv.tfid , -1)
- end
- end
- return true
- end
- ]]></event><!-- CS Text Effect Script -->
- <globalevent name="CSTextEffect" interval="1" event="script"><![CDATA[
- domodlib('cswar_settings')
- function onThink(interval, lastExecution)
- for _, name in ipairs(getOnlinePlayers()) do
- local cid = getPlayerByName(name)
- if getPlayerStorageValue(cid, sv.ctid) >= 1 then
- doSendMagicEffect(getPlayerPosition(cid), 12)
- doSendAnimatedText(getPlayerPosition(cid), "CT Force", (17))
- elseif getPlayerStorageValue(cid, sv.tfid) >= 1 then
- doSendMagicEffect(getPlayerPosition(cid), 13)
- doSendAnimatedText(getPlayerPosition(cid), "Terrorist", TEXTCOLOR_RED)
- end
- end
- return true
- end
- ]]></globalevent><!-- CS Change Map Custom -->
- <globalevent name="CSChangeMap" interval="3600" event="script"><![CDATA[
- domodlib('cswar_settings')
- function onThink(interval, lastExecution)
- for _, name in ipairs(getOnlinePlayers()) do
- local cid = getPlayerByName(name)
- if getPlayerStorageValue(cid, sv.ctid) <= 1 and getPlayerPosition(cid) == csteam.de_dust_red then
- doTeleportThing(cid, csteam.de_aztec_red)
- doBroadcastMessage("[ChangeMap] Se ha Cambiado de Mapa a de_aztec.")
- elseif getPlayerStorageValue(cid, sv.tfid) <= 1 getPlayerPosition(cid) == csteam.de_dust_green then
- doTeleportThing(cid, csteam.de_aztec_green)
- doBroadcastMessage("[ChangeMap] Se ha Cambiado de Mapa a de_aztec.")
- end
- end
- return true
- end
- ]]></globalevent>
- </mod>
Add Comment
Please, Sign In to add comment