Hello i have made a jail script.
How i shold work :
When the player has killed more than 6 players he shold be teleported to the jail position and then a broadcast is casted to notify others that a player has been jailed.
Im a big noob on lua right now.
But in my opinion is that trying is the best way to learn to code.
So is this script going to work or have i done everything wrong?
How i shold work :
When the player has killed more than 6 players he shold be teleported to the jail position and then a broadcast is casted to notify others that a player has been jailed.
Lua:
local amount = getPlayerRedSkullTicks(cid)
local JailPos { x, y, z}
local playerName = getCreatureName(cid)
local Text = " has been sent to jail. The reason is too many unjustify kills!"
function onKill(cid, isPlayer(cid))
if(amount > 6) then
{
doBroadcastMessage( playerName + Text );
doTeleportThing( cid, jailpos );
}
end
end
Im a big noob on lua right now.
But in my opinion is that trying is the best way to learn to code.
So is this script going to work or have i done everything wrong?