11.05.2011, 12:21
Well, its simple.
When i /ban someone, it should show up on my website.. How to do that? A pic in attachment.
When i /ban someone, it should show up on my website.. How to do that? A pic in attachment.
|
I'm sorry, I had to reply given your signature!
"it's" has an apostrophe when used as a contraction of "it is", it does not have a apostrophe when used for possession, contrary to the usual rule for possession. If for some reason you are talking about multiple "its" (such as in this sentence) then again there is no apostrophe. Never mind that this sentence has no context and thus "it's" is incorrect and that you started it with "Well". "I" is always capitalised. "/ban" is the name of a command, and as such is a noun, not a verb. You cannot "/ban" someone, you can ban someone using "/ban", you could use your "/ban" command on someone, but there needs to be an action in the sentence. Sentences should end with only one full stop, there is sometimes a use of three, but not two. The last sentence was just a mess and I have completely rewritten it. Firstly "pic" is an abbreviation so should be "pic.", or simply "picture". Secondly that sentence has an object (the picture in the attachment) but no subject (what about the picture in the attachment)? Even as an object it is wrong and should be something more along the lines of "the picture in the attachment", or "the attached picture". If you want to be a grammar Nazi, you had better make sure you are perfect, or at least very close! If you wish to rip apart this post feel free, but I am making no claims that it is correct, unlike you. As for your original problem, how are you banning people and how are you saving that data? Does your website have access to the location in which you are storing that ban data (SQL, Scriptfiles, samp.ban etc)? |

CMD:ban( playerid, params[ ] )
{
new
id,
reason[ 128 ]
;
if( sscanf( params, "us[128]", id, reason ) )
return SendClientMessage( playerid, 0xAAAAAAAA, "USAGE: /ban [ID] [Reason]" );
if( !IsPlayerConnected( id ) )
return SendClientMessage( playerid, 0xAAAAAAAA, "Invalid ID" );
new
query[ 128 ],
playername[ 24 ]
;
GetPlayerName( id, playername, 24 );
format( query, sizeof query, "INSERT INTO `bans` (`nick`, `banned`, `bannedreason`) VALUES (%s, 1, '%s')", playername, reason );
mysql_query( query );
return 1;
}
public OnPlayerConnect( playerid )
{
new
query[ 128 ],
playername[ 24 ],
escplayername[ 24 ]
;
GetPlayerName( playerid, playername, 24 );
mysql_real_escape_string( playername, escplayername );
format( query, sizeof query, "SELECT * FROM `bans` WHERE `nick` = '%s'", escplayername );
mysql_query( query );
mysql_store_result( );
if( mysql_num_rows( ) != 0 ) // Ban found
{
SendClientMessage( playerid, 0xAAAAAAAA, "Banned from this server! " );
Kick( playerid );
}
mysql_free_result( );
return 1;
}
?|
You'd need to use some basic PHP and MySQL ( dunno if it's possible with samp.ban )...
Here is just a simple example /ban command saving to a database called "whatever your DB is" and table called "bans" with g-Stlyezzz's MySQL plugin and 3 fields called "nick", "banned" and "bannedreason", also using ZCMD and sscanf: pawn Код:
For PHP, I won't teach u that. By the way, ****** is a grammar nazi ? |
BTW, when i buy SA-MP server hosting, theres also a MySQL in the controll panel. Is that the MySQL that i should get the data, username, pass etc... ? Because i use wamp atm.