function battletimer(playerid) {
local player = FindPlayer(playerid);
if (!player) return;
player.Pos = Vector(-540.772, 792.789, 195.213);
Message(">> BATTLE AREA << " + Player.Name + " has entered the battle area (/battle)")
player.World = 50;
}
if (cmd == "battle") {
MessagePlayer(">> You have to wait 3 seconds to enter in /battle area",player );
NewTimer("battletimer", 3000, 1, player.ID)
}
CREDITS: Alecumadalin32 modified my me ;D
Why to wait 3 seconds, but more important why so many querysql calling? You can use only one for updating all the data.
(Won't ask why you saving player data there)
fixed. (removed saving spawnloc there.)
? ? ? ye u have to wait for 3seconds to enter in battle area.
Have you thought about onPlayerSpawn?
battle <- array(100,false);
function battletimer(playerid) {
local player = FindPlayer(playerid);
if (!player) return;
battle[ playerid ] = true;
player.Pos = Vector(-540.772, 792.789, 195.213);
Message(">> BATTLE AREA << " + Player.Name + " has entered the battle area (/battle)")
player.World = 50;
}
if (cmd == "battle") {
if ( battle == true ) MessagePlayer(">>Your already in battle.",player);
else
{
MessagePlayer(">> You have to wait 3 seconds to enter in /battle area",player );
NewTimer("battletimer", 3000, 1, player.ID)
}
}
onPlayerSpawn <- function(player)
{
if ( battle[ player.ID ] == true )
{
player.Pos = Vector(-540.772, 792.789, 195.213);
}
}
what you mean?