Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include "../pawno/include/a_samp.inc"
- #include "../pawno/include/a_mysql.inc"
- #define MySQL_HOST "localhost"
- #define MySQL_USER "root"
- #define MySQL_DATA "gta-online"
- #define MySQL_PASS ""
- stock GetPlayerNameEx( playerid )
- {
- new
- Name[ MAX_PLAYER_NAME ]
- ;
- GetPlayerName( playerid,Name,MAX_PLAYER_NAME );
- return Name;
- }
- public OnGameModeInit()
- {
- mysql_debug( true );
- mysql_connect( MySQL_HOST,MySQL_USER,MySQL_DATA,MySQL_PASS );
- if( mysql_ping( ) >= 1 )
- {
- print( "Prisijungeme prie MySQL sekmingai!" );
- }
- else
- {
- SendRconCommand( "exit" );
- }
- return true;
- }
- public OnGameModeExit()
- {
- mysql_close( );
- return true;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new
- Query[ 200 ]
- ;
- format( Query,sizeof( Query ),"SELECT * FROM 'players' WHERE 'Vardas' = '%s'",GetPlayerNameEx( playerid ) );
- mysql_query( Query );
- mysql_store_result( );
- if( mysql_num_rows( ) )
- {
- ShowPlayerDialog( playerid,0,DIALOG_STYLE_INPUT,"Login","Praðme prisijungti","Jungtis","Atðaukti" );
- }
- else
- {
- ShowPlayerDialog( playerid,0,DIALOG_STYLE_INPUT,"Register","Praðome uþsiregistruoti","Register","Atðaukti" );
- }
- mysql_free_result( );
- return true;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if( dialogid = 0 ) //reg
- {
- if( response )
- {
- if( !strlen( inputtext ) )
- return SendClientMessage( playerid,-1,"Laukelis negali bûti tuðèias." );
- if( strlen( inputtext ) > 40 )
- return SendClietMessage( playerid,-1,"Slaptaþodis negali bûti ilgesnis nei 40 simbloiø." );
- new
- Query[ 150 ]
- ;
- format( Query,sizeof( Query ),"INSERT INTO 'players' (Vardas,Slaptazodis) VALUES ('%s','%xs')",GetPlayerNameEx( playerid ),inputtext );
- mysql_query( Query);
- }
- else
- {
- Kick( playerid );
- }
- return true;
- }
- if( dialogid = 1 //log
- {
- if( response )
- {
- if( !strlen( inputtext ) )
- return SendClietMessage( playerid,-1,"Laukelis negali bûti tuðèias." );
- if( strlen( inputtext ) > ë0 )
- return SendClietMessage( playerid,-1,"Slaptaþodis negali bûti ilgesnis nei 40 simboliø." );
- new
- Query[ 150 ]
- ;
- format( Query,sizeof( Query ),"SELECT * FROM 'players' WHERE 'Vardas' = '%s' AND 'Slaptazodis' = '%s'",GetPlayerNameEx( playerid ),inputtext );
- mysql_query( Query );
- mysql_store_result( );
- if(! mysql_num_rows( ) )
- {
- Kick( playerid );
- }
- else
- {
- SendClientMessage( playerid,-1,"Prisijungëte sëkmingaiÀ" );
- }
- if( !response )
- {
- Kick( playerid );
- }
- mysql_free_result( );
- return true;
- }
- return true;
- }
- return true;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- errorrrrrrraaaaaiiii
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(70) : warning 217: loose indentation
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(240) : warning 211: possibly unintended assignment
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(246) : warning 217: loose indentation
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(247) : error 017: undefined symbol "SendClietMessage"
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(259) : warning 217: loose indentation
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(261) : warning 217: loose indentation
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(261) : warning 211: possibly unintended assignment
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(262) : error 029: invalid expression, assumed zero
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(266) : error 017: undefined symbol "SendClietMessage"
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(267) : warning 217: loose indentation
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(267) : error 029: invalid expression, assumed zero
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(267) : warning 215: expression has no effect
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(267) : error 001: expected token: ";", but found ")"
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(267) : error 029: invalid expression, assumed zero
- F:\Scriptingas\Mokomes\gamemodes\role-play.pwn(267) : fatal error 107: too many error messages on one line
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement