[Tutorial] Crashing a user for a specific time
#1

Hello All!

I had been away from a long time from SA:MP and i actually forgot scripting, so i won't be able to tell you in coding how to implement it but i will give you a rough idea on how to crash a user for a specific time.

How to crash a user
So, First i will tell you how to crash a user.
Simply create a command and set targetid's skinid to any invalid skinid.
This will help you crash a user easily.

But if you want to know how to crash a user for a specific time.

How to crash a user for a specific time
Simply set a timer and when you use the command on user, set his skinid to an invalid skinid and set timer with your time which you want to set it for. You Dont have to stop the timer and you can also create a pVar for better functioning.

Sorry for just explanation, I can't help you scripting it.
Reply
#2

Why you an admin/moderator want to crash some of their players? Stupid people, Stupid posts...
Reply
#3

Quote:
Originally Posted by biker122
Посмотреть сообщение
Why you an admin/moderator want to crash some of their players? Stupid people, Stupid posts...
If you are a low level administrator and can't kick a hacker everytime he logins, simply use it.
Reply
#4

The crash by invalid skin ID has been fixed IIRC

Crashing through wrong use of the ~ character in game texts is still possible
Reply
#5

About crashing people you could use something like (you can add it to the thread if you want):

pawn Код:
stock Crash(playerid)
{
ApplyAnimation(playerid,"System", "M_smkasdf_loop_", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(playerid,"Operating", "M_sasfloop_", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(playerid,"Crashed", "sdgsdf_", 4.0, 1, 0, 0, 0, 0);
GameTextForPlayer(playerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0);
GameTextForPlayer(playerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1);
GameTextForPlayer(playerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2);
GameTextForPlayer(playerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3);
GameTextForPlayer(playerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4);
GameTextForPlayer(playerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5);
GameTextForPlayer(playerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6);
ApplyAnimation(playerid,"Finish", "M_smkleafds_", 4.0, 1, 0, 0, 0, 0);
}
And inside your command:

pawn Код:
Crash(playerid);
About your post, you should change that information about invalid skins, it was fixed long time ago.

Also you can use this way to "crash" players:

Quote:
Originally Posted by JernejL
Посмотреть сообщение
This is fairly simple thing to achieve, so i did not include code.

Basically, sometimes you want a player to reconnect - say if a player pauses and you wish to kick him & have him reconnect when he returns, or for various other reasons, so this is how it works:

1. In code, rcon ban the ip, but DON'T KICK the player
2. The player will timeout, in onplayerdisconnect unban the ip that was banned for him - remember that getplayerip doesnt work in onplayerdisconnect, so store the value elsewhere.
3. Player's client will lose connection and attempt to auto-reconnect afterwards.
As cessil said, it is also a way of kicking players that might be cheaters and you are not sure if they actually are.

Good luck
Reply
#6

Crashing for one time is ok but as you said about timer its not ok as when the player will crash he will ofc disconnect from the server and some other innocent player may be assigned the same id while he is connecting to server.. so he would get crashed too, which a server owner would never want.
So timer idea is really bad.
And so it turns out that it is similar to Kick() but is not better than Kick()...
So I think this is useless...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)