RobsonDias
New Member
hello
I have a script that when the player steps on the tile, he switches to the aid of tile 101, and again when the player switches to step 100, podesse wanted someone to help me.
see script
srry for bad english ;d
I have a script that when the player steps on the tile, he switches to the aid of tile 101, and again when the player switches to step 100, podesse wanted someone to help me.
see script
Code:
function onStepIn(cid, item, position, fromPosition)
local config = {
gametime = -1, --time in mins
redSide = {x=48, y=70, z=7, stackpos=253},
blueSide = {x=116, y=91, z=7, stackpos=253},
outfitRed = {lookType = 130, lookHead = 94, lookAddons = 1, lookLegs = 94, lookBody = 94, lookFeet = 94},
outfitBlue = {lookType = 130, lookHead = 88, lookAddons = 1, lookLegs = 88, lookBody = 88, lookFeet = 88}
}
local redStorage = getGlobalStorageValue(2001)
local blueStorage = getGlobalStorageValue(2002)
if getPlayerIp(cid) == 0 then
doSendMagicEffect(position,28)
doRemoveCreature(cid)
return false
end
if item.actionid == 100 then
doSetCreatureOutfit(cid, config.outfitRed , config.gametime)
doSetItemActionId(item.uid,item.actionid+1)
doTeleportThing(cid,config.redSide,false)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You are on the Red team")
doPlayerSetStorageValue(cid, 1000, 3)
doPlayerSetTown(cid,1)
elseif item.actionid == 101 then
doSetCreatureOutfit(cid, config.outfitBlue , config.gametime)
doSetItemActionId(item.uid,item.actionid-1)
doTeleportThing(cid,config.blueSide,false)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You are on the Blue team")
doPlayerSetStorageValue(cid, 1000, 4)
doPlayerSetTown(cid,2)
end
return true
end
srry for bad english ;d