Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if ( ( cmd == "goto" ) || ( cmd == "tele" ) )
- {
- local plr = player.ID;
- if ( status[ player.ID ].Registered == false ) ErrorMessage( "[#FFFFFF]You need to be a part of our community to use this command.", player );
- else if ( status[ player.ID ].Logged == false ) ErrorMessage( "[#FFFFFF]You need to be identified to use this command.", player );
- else if ( LMSS[ plr ].IsLMS == true ) ErrorMessage("The player is in LMS, you can't teleport..", player );
- else if ( LMSS[ player.ID ].IsLMS == true ) ErrorMessage("You cannot use this command while in LMS", player );
- else if ( status[ player.ID ].Duel == true ) ErrorMessage("You cannot use this command while in duel zone", player );
- else if ( status[ player.ID ].gungame == true ) ErrorMessage("You cannot use this command while in gungame", player );
- else if ( status[ plr ].Duel == true ) ErrorMessage("The player is in duel zone, you cannot teleport.", player );
- else if ( status[ plr ].gungame == true ) ErrorMessage("The player is in gungame, you cannot teleport.", player);
- else if ( !player.IsSpawned ) ErrorMessage("[#008000][Server] - [#FFFFFF]You need to be spawned to use this command.", player );
- else if ( !text ) ErrorMessage( "[#FF0000][SYNTAX] - [#FFFFFF]/" + cmd + " <Player/ID>", player );
- else if ( player.Cash < 100 ) ErrorMessage( "[#FFFFFF]You need atleast $100 to use this commad.", player );
- else
- {
- local plr = GetPlayer( GetTok(text, " ", 1) ),
- query = QuerySQL(db, "SELECT Nogoto FROM Accounts WHERE Name = '"+plr.Name+"'" );
- if ( !plr ) ErrorMessage("[#FFFFFF]The player is not online.", player );
- else if ( !plr.IsSpawned ) ErrorMessage("[#FFFFFF]The player is not spawned yet.", player );
- else if ( GetSQLColumnData( query, 0 ) == "on" ) ErrorMessage("[#FFFFFF]The player has turned his nogoto on!.", player );
- else if ( plr.ID == player.ID ) ErrorMessage("[#FFFFFF]You can not teleport to yourself.", player );
- else
- {
- NewTimer( "Teleport", 5000, 1, player.ID, plr.ID );
- Announce( "~b~ Teleporting.", player, 6 );
- player.IsFrozen = true;
- SendMessage("You will be teleported to "+plr.Name+" in 5 seconds to prevent death evasion.", player );
- SendMessage(RED+"[ALERT]: "+player.Name+" is trying to teleporting to you in 5 seconds. ", plr );
- }
- FreeSQLQuery( query );
- }
- }
Add Comment
Please, Sign In to add comment