nice
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuif(cmd == "createobject") {CreateObject( 500, 1, Vector( player.Pos.x, player.Pos.y, player.Pos.z), 255 ).RotateByEuler( Vector( 3.14159, 3.14159, 0.618407), 0); }
player.Angle = object.RotationEuler;
if(cmd == "sethp")
{
if(!text) MessagePlayer("[#CCFF66]** Use /" + cmd + " <hp> <Name>", player);
else
{
local plr = FindPlayer(GetTok( text, " ", 2 ));
local health = GetTok( text, " ", 1, NumTok( text, " " ) );
if(!plr) MessagePlayer("[#CCFF66]** Invalid Player", player);
else
{
plr.Health = health.tointeger();
Message("[#CCFF66]** Your hp has been set to :" + health + "by :" + player.Name + ".");
}
}
}
function onPlayerCommand(player, command, arguments)
{
if(command == "sethp")
{
if(!arguments) MessagePlayer("[#CCFF66]** Use /" + command + " <hp> <Name>", player);
else
{
local plr = FindPlayer(GetTok( arguments, " ", 2 ));
local health = GetTok( arguments, " ", 1, NumTok( arguments, " " ) );
if(!plr) MessagePlayer("[#CCFF66]** Invalid Player", player);
else
{
plr.Health = health;
Message("[#CCFF66]** Your hp has been set to :" + health + "by :" + Player.Name + ".", plr);
}
}
}
}
GetTok Function
function GetTok(string, separator, n, ...)
{
local m = vargv.len() > 0 ? vargv[0] : n,
tokenized = split(string, separator),
text = "";
if (n > tokenized.len() || n < 1) return null;
for (; n <= m; n++)
{
text += text == "" ? tokenized[n-1] : separator + tokenized[n-1];
}
return text;
}
Numtok Function
function NumTok(string, separator)
{
local tokenized = split(string, separator);
return tokenized.len();
local s = split(string, separator);
return s.len();
}
Quote from: Bryan^ on Jul 24, 2017, 02:39 AMc: Thanks [CK]Zone_Killer Leader :vOld clan [VU]
Quote from: MatheuS on Jul 22, 2017, 05:11 PMsame problem. i have tried this. Only 40 checkpoints Are appearing.CreateCheckpoint(player, world, isSphere, pos, rgb, radius)
You're using ARGB ( use RGB( R, G, B ) ) and converting to .tofloat but the color is .tointeger()