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

Messages - [KM]Helathien

#1
Snippet Showroom / Re: player ranks
Sep 23, 2018, 06:28 AM
Quote from: umar4911 on Sep 16, 2018, 02:03 PMComplete waste topic
I agree, I haven't tested it but I know it won't work.

@marineforce plr.kill doesn't exist tho.
#2
Support / Re: How to fix this Radio error?
Aug 13, 2018, 05:35 PM
Quote from: (SpCy)Alex on Aug 12, 2018, 12:21 PMIf it works correctly it dissable the message print
Its not working, It was not playing any song for some players (not all). And I used /showdebug 1, and this message came.
#3
Support / Re: How to fix this Radio error?
Aug 10, 2018, 01:31 PM
It says [NETRADIO] Failed to create channel for KF.Roycewicz, error code 2.
When roy did /playsong ( radio )
#4
Support / How to fix this Radio error?
Aug 10, 2018, 11:37 AM


Some players are getting this error, and the radio is playing. Any fix?
#5
Snippet Showroom / Re: Basic Ban System
Jul 29, 2018, 06:43 AM
I haven't checked it on server, but seeing from the code I can see that the CheckBan function only checks the Name of the player, whereas when you banned the player his name and IP Both were saved.
This way player can just change his name and come. So please also add
local q1 = QuerySQL( Bans, "SELECT * FROM Bans WHERE IP ='" +player.IP+"'")
local ip = GetSQLColumnData(q1, 1)
if (ip) KickPlayer(player)
else if (name) KickPlayer(player)
else if ( ip && name) KickPlayer( player)
else return 0

I am on mobile right now, but you get the idea.
Good job BTW.
#6
Umar4911 bro, can you pm me of vks forum about how did you make the bot. Thanks
#7
Servers / Re: [0.4] Vice City Cops & Robbers
Jun 25, 2018, 01:58 PM
Nice. It is indeed addictive ;D ;D
#8
Bro the easiet way is just name the timer in onscriptload
Ex
T1=NewTimer..........


And then when u want to remove it just so
T1. Delete()
#9
The only thing I can think of is using timers right now. This way it will announce in ID 1, rather then Messaging.
Hope it helps a litte.

class PlayerStats
{
lastangle = null;
}

else if ( cmd == "checkangle" )
{
if ( stats[player.ID].lastangle == null ) stats[player.ID].lastangle = player.Angle;

{
NewTimer( "CheckAngle" , 1000, 0 , player.ID)
}
}

function CheckAngle( player )
{
local player = FindPlayer( player )
local lastangle = stats[player.ID].lastangle;
local newangle = player.Angle;
Announce( "Your Last Angle: " + lastangle + " New Angle " + newangle , player, 1 )
stats[player.ID].lastangle = newangle;
}
#10
Just do it like this
local InPlace = DistanceFromPoint(Cosa.x,Cosa.y,player.Pos.x,player.Pos.y) < 10
else if ( !InPlace )

#11
Bro, What you actually do is just make a playerclass.
class PlayerStats
{
Cars = 0;
}

After That you should also update your database for example;
function onScriptload()
{
//just add this into your stats database or make a seperate for this
db <- ConnectSQL( "DataBase.db" );
stats <- array( GetMaxPlayers(), null )
QuerySQL(db, "CREATE TABLE IF NOT EXISTS Stats( Name TEXT, KILLS NUMERIC, DEATHS NUMERIC, CASH NUMERIC, CARS NUMERIC )
}

After That just edit your loadstats function example.
function LoadStats(player)
{
local q = QuerySQL( "SELECT * FROM Stats WHERE Name = '"+player.Name+"'" )
if ( q )
{
stats[player.ID].Cars = GetSQLColumnData( q, 4)
// just add this into your loadstats functions.
}
}

After That just make it like this
if ( stats[player.ID].Cars >= 3  ) MessagePlayer( "[#ff1111]Error: [#ffffff]You can not buy more then 3 cars"  ,player )
This code is untested. But you get the point
#12
It is used to execute functions.
The most Easy Example of which is,
/exec Message( "[INFO]Your Message Here" )

And it will send message.
You Can also execute custom function made by you.
#13
I don't know much about your IRC, or any IRC :P
But here is mine.

function FBSLIST::AddNick( Nick, AdminLevel )
{
//This is place where you setted you level. Just the rest according to yours
Name = Nick;
Level = AdminLevel;
}


Then make your tags
function LevelTag(lvl) {
//Make tags
lvl = (lvl ? lvl:0);
switch (lvl) {
case 2:
return "IRC Moderator>";
case 3:
return "IRC Admin>";
case 4:
return "IRC Manager>";
case 5:
return "IRC Helper>";
case 6:
return "IRC Owner>";
default:
return "IRC User>";
}
}


Then just edit the Message.
LevelTag1(level) + " " + Nick + ":" + text // Just add this to your IRC
#14
Nice.