SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 01/07/2014, 08:07 PM   #1
Blademaster680's Avatar
Join Date: Jul 2013
Location: On my Yamaha R6
Posts: 607
Reputation: 26
Post MYSQL Check Ban Help

Can someone help me with this stock. Its not checking if the player is banned.
stock Checkban(playerid)
	new Query[215], rows, fields, pIP2[215];
	new bReason[215], bannedBy[215], savestr[215];
	GetPlayerIp(playerid, pIP2, sizeof(pIP2));
	mysql_format(dbHandle, Query, sizeof(Query), "SELECT * FROM `Bans` WHERE `Name` = '%e'", pName(playerid));
	cache_get_data(rows, fields);
		cache_get_field_content(0, "Reason", savestr);			bReason = savestr;
		cache_get_field_content(0, "BannedBy", savestr);		bannedBy = savestr;
		new string[256], IP[24], dialogText[500];
		GetPlayerIp(playerid, IP, sizeof(IP));
        format(string, sizeof(string), "%s Banned - %s", COL_ORANGE, GetName(playerid));		
		format(dialogText, sizeof(dialogText), "You are banned from this server \n\nReason: %s\n\n Banned By: %s", bReason, bannedBy);
	    ShowPlayerDialog(playerid, DIALOG_BANNED, DIALOG_STYLE_MSGBOX, string, dialogText, "Ok", "");
	return 0;

Blademaster680 is offline   Reply With Quote
Old 01/07/2014, 09:55 PM   #2
Join Date: Jun 2012
Location: HKJ
Posts: 512
Reputation: 62
Default Re: MYSQL Check Ban Help

Why return 0;? it's 1
Sawalha is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th audriuxxx Scripting Help 4 11/04/2014 07:42 PM
[HELP] mysql check V4at Scripting Help 10 25/02/2014 08:52 PM
[Help] Mysql check VMe89 Scripting Help 1 20/03/2012 06:16 PM
mysql check ajwar Scripting Help 2 08/02/2012 04:03 PM
mysql check ban Ricop522 Scripting Help 8 01/02/2012 03:11 AM

All times are GMT. The time now is 07:35 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.