Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(dialogid == 17)
- {
- new
- text [ 64 ],
- String[ 128 ],
- query [ 1024 ]
- ;
- strmid ( text, inputtext, 0 , 64 );
- StringToInt( text );
- if(! strcmp( text, "0" , true ) )
- {
- format ( String, sizeof( String ),
- "No code!",pName( playerid ) );
- ShowPlayerDialog( playerid, 17, DIALOG_STYLE_INPUT,
- "Code registration.",String,
- "Register",
- "Close");
- format ( String, sizeof( String ),
- " Sucsessful added code - (code: %s)",text);
- return 1;
- }
- mysql_real_escape_string( pName( playerid ), pName( playerid ) );
- mysql_real_escape_string( text, text );
- //
- format ( query, 1024, "INSERT INTO `"TABLENAME"` (Name, Code, pos_X, pos_Y, pos_Z) VALUES ('%s', ('%s'), '-1423.9208', '-292.9589', '14.1484')" ,pName( playerid ), text );
- mysql_query( query );
- //
- mysql_store_result( );
- mysql_free_result( );
- print("Registered");
- return 1;
- }
Add Comment
Please, Sign In to add comment