Menu

Show posts

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 Menu

Topics - Saiyan Attack

#1
Hello everyone !!

I need help for making position system in race i saw in gta vice city RC bandit Race that player can seen their position when someone left back .... is that possible that we can make the same position system in vcmp ?? if yes then how ?

sorry for my bad english :'(
#2
Hello Everyone !!

Today I'm going to release a snippet called server lock & unlock system ... with this snippet you can get server password & detect that your server is lock & unlock ... This lock system will only worked when you use _Server.Password ... It's mean you guys just forget about SetPassword and starting using _Server.Password ... cause the ability to get lock pass & stats is in _Server.Password ... why do i tell that becoz some newbies doesn't know how to scripting ... if newbies want to use this so it will definitely know about how it work ... so lets get start ...

_Server <- {
lock = false,
password = null

function Password(pass)
{
if(pass!="") {
SetPassword(pass);
password=pass;
lock=true;
}
else {
SetPassword(pass);
password=pass;
lock=false;
}
}

function GetLock() { return lock; }
function GetPassword() { return password; }
}

function onScriptLoad()
{
print("Server Lock & Unlock System Loaded!");
}
function onPlayerCommand( player, command, text )
{
local cmd = command.tolower();
if ((cmd == "svr")||(cmd == "server"))
{
if (!text) MessagePlayer("[syntax] /"+cmd+" <stats/pass/lock/unlock>",player);
else {
local stat = GetTok(text," ", 1).tolower();
if ((stat == "stats")||(stat == "status")) {
if(_Server.GetLock() == true) MessagePlayer("This Server Are Locked",player);
else MessagePlayer("Server Is Open For Public Use!",player);
}
else if ((stat == "pass")||(stat=="password")) {
if(_Server.GetLock() == false) MessagePlayer("Server Is Running Without Password Protection !!",player);
else MessagePlayer("Server Password Is:[ "+_Server.GetPassword()+" ]",player);
}
else if ( stat == "lock" ) {
local password = GetTok(text, " ", 2);
if(!password) MessagePlayer("[syntax] /"+cmd+" <lock> <enter your password>",player);
else if (_Server.GetLock()==true) MessagePlayer("Server Is Already Locked!",player);
else {
_Server.Password(password);
PrivMessage(player,"Server Is Lock With Password: "+_Server.GetPassword()+", Status: "+_Server.GetLock());
}
}
else if ( stat == "unlock" ) {
if(_Server.GetLock()==false) MessagePlayer("Server Is Already Unlocked !!",player);
else {
_Server.Password("");
PrivMessage(player,"Server Is Now Open For Public Use!");
}
}
else MessagePlayer("[syntax] /"+cmd+" <stats/pass/lock/unlock>",player);
}
}
}
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;
}

function NumTok(string, separator)
{
local tokenized = split(string, separator);
return tokenized.len();
}

credits :- [KoF]Killer
#3
hello everyone !!

i am here to ask about timer that use for every single player when they need arise ... Is it okay ? if i use like that ...
function onScriptLoad() {
loadtimerforplayer <- array(100,null);
}

function onPlayerCommand(player, cmd, text) {
if (cmd == "runforme") {
loadtimerforplayer[player.ID] = NewTimer("TimerRuns",1000,10,player.ID);
}
}
function TimerRuns(player) {
local plr = FindPlayer(player);
if(plr) {
MessagePlayer("this is just an example this is not the actual code !!",plr);
}
}
#4
Hello Everyone !!

i am facing a problem since last week that killing heli's and boat's engine ....
i tried player.Vehicle.SetHandlingData(13,0);
player.Vehicle.SetHandlingData(14,0);
but this way not work on both ...
then i try player Vehicle.Speed = Vector(0,0,0); failed :( !!
is there any other way that can kill heli's and boat's engine without freezing player ?

Sorry for my bad english :(
#5
hello everyone !!

as you can see the topic name explain everything for what i should do ... is there any possible way to detect ? I Tried to Geting Anim but it didn't work becoz I Have Just The Option Of Setting ...

function onPlayerHealthChange( player, oldhp, newhp )
{
if(player.SetAnim(0,156)) return MessagePlayer("You're Drowning You Need To learn How to swimming before to do Such type of stunt :P",player); // this for when player is drowing ...
}

I tried to edit with player.Pos.z function but failed :(
Becoz Map Heights Somewhere up and somewhere down ...

function onPlayerHealthChange( player, oldhp, newhp )
{
if(player.Pos.z.tofloat()<8.000) return MessagePlayer("You're Drowning You Need To learn How to swimming before to do that like of stunt :P",player); // this for when player is drowing ...
}

Sorry For My Bad English :(
#6
Hello Everyone Who Read This Topic !!

I Want Know That How To Reset Vehicle_ID's In Database For Example I Have 182 Vehicles In My Sqlite Database And I Remove VehicleID 180 From Database When Server Is Online But When I Restart Them So Left I Have 181 Vehicles In My Database I Want To Reset Their ID's From Database .... I Use This Code But It Doesn't Work :( ....

Here Is The Code:-
function ResetIDs()
{
local i=1;
while(i <= GetVehicleCount()) {
QuerySQL(db,"UPDATE Vehicles SET Vehicle_ID='"+i+"' WHERE rowid='"+i+"'");
i ++;
}
print("Total Loaded Separated VehicleID's - "+i);
}

Screen:
#7
Hello Everyone !!

I want to know that is possible to block a player from public chat ... for example if player1 abuse player2 and player2 want to block player1 then player1 message didn't received player2 but other players can read their messages ... is it possible   if yes than how ??
#8
Hello Everyone !!

I want to attach my server-side command to client-side script and it's attach well no error appear but it doesn't work !!  ...

Server-side cmd :
if (cmd == "cmds")
{
local str = Stream();
str.WriteInt(12);
str.WriteString("Command");
}

Client-side function :
function Server::ServerData(stream)
{
local stint = stream.ReadInt();
local stread = stream.ReadString();
if (stint==12) {
if (stread == "Command") {
Console.print("Working");
}
}
}
#9
Hello All Who Reads This Problem,

I Have A Problem With The Time Zone For My Country But It's Not Showing Me The Exact Time Of My Country For Example:
I'm From Pakistan So My Timezone Is GMT +5 It's Mean The Time At My Country Is 20:25 But The Server Show Me This Time



Here Is The Print That I'm Using ....
print(date(time()+(3600*5)).hour+":"+date(time()+(3600*5)).min);
Have Any Solution To Fix It ? :'(
#10
Can I Disable /kill ? I Try Many Way To Disable It But Failed :'( Is It Possible ? Then How ?