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 - Mohamed Boubekri

#271
Snippet Showroom / [SNIPPET] BanInfo Command.
Nov 19, 2017, 07:11 PM
Hello The Command Already Posted For Liberty City Forum
But its For VCMP 0.3
I'm Transfered It To 0.4 Only For the Newbie.

Command : ( For The Ban System @Diego^ )

else if ( cmd == "baninfo" )
{
if ( !text ) MessagePlayer( "[#00BBFF][INFO][#ffffff] /baninfo <Full-Nick>", player );
// If Player Not Logged In Message Here
// Level To Acces As That Command
else {
local q = QuerySQL( db,  "SELECT * FROM SubBans WHERE Name='" + text + "'" );
if ( GetSQLColumnData( q, 0 ) != text ) MessagePlayer( "[#ff0000][Error] - " + text + " is not Banned.", player );
else
{
MessagePlayer( "[#00ffff][INFO][#ffffff] Player Name Found!", player );
MessagePlayer( "[#00ffff][INFO][#ffffff] Player : " + text, player );
MessagePlayer( "[#00ffff][INFO][#ffffff] IP : " + GetSQLColumnData( q, 1 ), player );
MessagePlayer( "[#00ffff][INFO][#ffffff] Banned by : " + GetSQLColumnData( q, 2 ), player );
MessagePlayer( "[#00ffff][INFO][#ffffff] Reason : " + GetSQLColumnData( q, 3 ), player );
}
}
}

Command : ( For the Ban System @zeus )

else if ( cmd == "baninfo" )
{
if ( !text ) MessagePlayer( "[#00BBFF][INFO][#ffffff] /baninfo <Full-Nick>", player );
// If Player Not Logged In Message Here
// Level To Acces As That Command
else {
local q = QuerySQL( db, "SELECT * FROM Bans WHERE Name='" + text + "' COLLATE NOCASE" );
if ( GetSQLColumnData( q, 0 ) != text ) MessagePlayer( "[#ff0000][Error] - " + text + " is not Banned.", player );
else
{
MessagePlayer( "[#00ffff][INFO][#ffffff] Player Name Found!", player );
MessagePlayer( "[#00ffff][INFO][#ffffff] Player : " + text, player );
MessagePlayer( "[#00ffff][INFO][#ffffff] IP : " + GetSQLColumnData( q, 1 ), player );
MessagePlayer( "[#00ffff][INFO][#ffffff] Banned by : " + GetSQLColumnData( q, 2 ), player );
MessagePlayer( "[#00ffff][INFO][#ffffff] Reason : " + GetSQLColumnData( q, 3 ), player );
}
}
}

                                                                                Hope Its Help :D




#272
Problem Solved By Me.
Just i Added That Line.

local q = QuerySQL( db,  "SELECT * FROM SubBans WHERE Name='" + text + "'" );
Thanks To @=RK=MarineForce Give me Idea !

Topic Locked.
#273
Yassssssss
#274
Hello Guys, i Have Command /baninfo Its Work Fine But //.

if Me Do /baninfo Say me Info for my self

i want to see info ban for other player. [ plr.name ) xd

else if ( cmd == "baninfo" )
{
local q = QuerySQL( db, "SELECT * FROM Bans WHERE Name='" + text + "' COLLATE NOCASE" );
if (!q) MessagePlayer( "[Error] - The player is not banned", player );
else
{
MessagePlayer( "[#00ffff][INFO][#ffffff] Player Name Found!", player );
MessagePlayer( "[#00ffff][INFO][#ffffff] Player : " + text, player );
MessagePlayer( "[#00ffff][INFO][#ffffff] IP : " + GetSQLColumnData( q, 1 ), player );
MessagePlayer( "[#00ffff][INFO][#ffffff] Banned by : " + GetSQLColumnData( q, 2 ), player );
MessagePlayer( "[#00ffff][INFO][#ffffff] Reason : " + GetSQLColumnData( q, 3 ), player );
}
}
[/]

                                                                              Helppppppppppp :'(


#275
Hello Guys I need Command /goto With Time 3 Second

Nogoto on/off and /heal with time with functions

HELP
#276
Quote from: Xenon on Nov 15, 2017, 10:56 PMYou need announcer plugin and you need port forwarding everyday?

1. Yes, you need Announce plugin.
2. No, if you don't reset your router to factory settings everyday.
But Announe Plugin Any one or Download new announe plugin ?
#277
Hello Guys. I'm Very Happy Bcz Yaster-Day im Port Forward all me friend Join my Server showeing.
My Server shuting down, And I'm Port Forward Agin im check port its work but when me do my ip not say me" waiting for data" but
say me Unknow Server,,,

1 : i need Announcer Plugin ?

2 : I'm Need To Every day Port Forward ?


                                                                    Please Ask :'(((
#278
Quote from: ahmedzead on Nov 15, 2017, 05:25 AMHi All i need an admin levels sys to my server can any one help me???

Oka Use Thi Its Better : http://forum.vc-mp.org/?topic=1436.msg9979#msg9979
#279
Ya. Any Help?
#280
Hello Allll. Good Night Everyone,
Today I'm Join To Tell You My problem.
I'm Want Turn Light ON or OFF Just For Boutton [ L ]
I have commands with /lighton /lightoff No Want That//
Want ON or OFF With Boutton / Keys L
#281
Script Showroom / Re: Vehicle System
Nov 06, 2017, 07:57 PM
I have test this and it Work
Keep up my friend.
#282
Quote from: Xmair on Nov 02, 2017, 09:09 AM
Quote from: [MCO]We3da on Nov 02, 2017, 07:11 AM
Quote from: [MCO]We3da on Nov 01, 2017, 08:12 PM
Quote from: Shadow on Nov 01, 2017, 04:04 PMI find it admirable that you thought of escaping the strings before doing the select query but you should've also escaped the name in the update query. Otherwise, BAD things can happen...
I never Never  Never Never Never Never  Understand Anithingggggggggggggggggggggggggggg
Please @Xmair Give me Example Bro :(
Imagine you have a command /gotoloc which executes the following query:
"SELECT XYZ FROM Locations WHERE Name = '" + locationName + "'"
where locationName is a string input by the user in the gotoloc command. Imagine there's a bad guy who uses /gotoloc '; DROP TABLE Accounts; instead of a location, this'll get executed:
"SELECT XYZ FROM Locations WHERE Name = ''; DROP TABLE Accounts;"
This'll ultimately execute both of the queries as there is a semicolon right after the SELECT query. To avoid this, you use mysql_escape in mySQL and escapeSQLString in SQLite.
You must be using SQLite so I'm going to put on an example in which can be used by the default SQLite plugin for VCMP.
Instead of:
QuerySQL( database, "SELECT XYZ FROM Locations WHERE Name = '" + locationName + "'" );
Use:
QuerySQL( database, "SELECT XYZ FROM Locations WHERE Name = '" + escapeSQLString( locationName ) + "'" );
Simple, isn't it? I've tried my best to explain it as easy as I could, if you still don't get it, meh.
@Xmair You Are Besstteeee ONe Help Me im Happyyyyyy And im Learned Now.
Thanks for helping my friend :D
#283
Quote from: umar4911 on Nov 05, 2017, 12:18 PMTo save stats, you need to save them in database too without that it is impossible
YeP im Got it @umar4911 im Already using Database For Save Stats.
And im Learn Exmple WIth System Car By @KrlozZ... He its Save Stats For Database
My DataBase Example Here The Line.

QuerySQL(sqliteDB,"UPDATE Accounts SET Level='" + lvl + "' WHERE Name='" + plr.Name.tolower() + "'");
Exatctly Now That Setlevel its Saved Thanks @KuRiMi / @umar4911 / For Help im Happy Now :D
#284
Quote from: umar4911 on Nov 06, 2017, 04:17 PMTo explain, Suppose there are 2 types of storage in the server. One is temporary and one is permanent. If I player kills another player and cash is added in temporary memory, it will be removed on player reconnect. If cash is only added in permanent memory, nothing will be shown but after player reconnect, the result will be displayed. If the cash is added in both permanent and temporary memory than the desired output will be saved that the result will be same even after player reconnect.

I read some code of Fuzzie account. There is a line pstats[player.ID]... This is the temporary memory and where QuerySQL(........); is used, it will be permanent memory. You need to save anything e.g. cash, level, name, etc, store that in both but Remember to use the both temporary memory and permanent memory when the player is online. If player is offline, then use only permanent memory.
Thanks Bro @umar4911 :D im Happy Bcz im Got it. And Now Me Can Save Cash Just im Added The Line For Command Setmoney
And Its Work Here its Line.  ;)
IncCash( plr, mon.tointeger() );
#285
Please Can Asked For All me Qaistion.

1 : The Fuzzi Accoun System Save Stats Player or no? but fuzzi accoun system saved level from me.

2 : Im Downloaded all command alll work now iknow about Scripting, Just If Me Setmoney that Not Saveed??? How to Work it??

3 : Fuzzi Account System, Is Niice?? No Problem??

Please Asked Me ( And Describe For Me Please ).