PDA

View Full Version : [FilterScript] [FS] Simple TOW ANY car (ideal for rp)


zeruel_angel
05/09/2007, 05:42 AM
TOW ANY CAR FS

With this FilterScript, you can tow any car (exept for bike, they can't be towed in ANY way). You enter a Tow Truck (model id 525) and you are told that you can tow cars with your ACTION KEY (remember that for optimal key reading, you must release other keys before hitting the desire key) You must be quite near the car.
If you want your car to be towed, you use "/TowMe" and if there is anyone in a towtruck he will be told about your situation, if not, you will be told that there issn't any tow trucker available at the moment.

ITS VERY SIMPLE, i just was asked for it, so here it its.
BTW here are some SS
http://img413.imageshack.us/img413/1493/samp017qm5.th.png (http://img413.imageshack.us/my.php?image=samp017qm5.png)http://img48.imageshack.us/img48/8553/samp018cq0.th.png (http://img48.imageshack.us/my.php?image=samp018cq0.png)

download Link:
English Version on a zip file (http://zeruel.vndv.com/samp/almacen/TowCars.zip)
English Version on PasteBin (http://pastebin.com/f12b60863)


BUGS: I put "id:&d" and it should be "id:%d" sorry, fixed that, change it(line 115) or re-download. (thanks ThaT_NoT_mE )

post here if you find any bug (YOU WILL ITS A PROMISE ;) )

See you later!

Alejandro
05/09/2007, 05:55 AM
oh hell yea...

this is SICK, niceee :D

smallo
05/09/2007, 07:03 AM
My god antoher great script by you. i used it, it's good . thanks

onehels
05/09/2007, 08:56 AM
plz, post you script in another place :!:
Becose I can not download it :|

zeruel_angel
05/09/2007, 08:59 AM
Hi, here -> http://pastebin.com/m4745f005

See you later!

Tommy_Vercetty
05/09/2007, 09:10 AM
Thank you, very very very useful script!

zeruel_angel
05/09/2007, 09:59 AM
HEY! =D THANKS! I didn't know that!
On the other hand... Now I have to edit and re-update all my FS... :| and re-open some old projects I have abondoned because of this...

Well lets get on work...

Again THANKS Y_Less!

See you later!

BMUK
05/09/2007, 10:59 AM
Very nice zeruel_angel

I may use this! :D

I will add your name at /credits

Thanks!!! :D

zeruel_angel
05/09/2007, 05:04 PM
Very nice zeruel_angel

I may use this! :D

I will add your name at /credits

Thanks!!! :D

Your are welcome, and thanks for the nice words everyone.


np, you can even do things like:

if (newkeys & KEY_ACTION && newkeys & KEY_CROUCH)

To detect multiple keys at once, however:

if (newkeys & (KEY_ACTION | KEY_CROUCH))

Will be true if either one is pressed (although it is a lot easier and faster than:

if (newkeys == KEY_ACTION || newkeys == KEY_CROUCH))

or even:

if (newkeys & KEY_ACTION || newkeys & KEY_CROUCH))

if that is in fact the desired effect.


Well I must tell that I'm not a very experimented coder, but this kind of statement is new to me. I never saw (or at least notice) the existence of an "&&" and an "&" operator in the same language, I do understand how to use the "&" but I DO NOT really understand how it works or what it "means". Would you mind given me a deeper explanation(don't worry about using especific words) or maybe a link to a manual/guide. (I have already readed the PAWN pdf and I don't remember anything about this "&" operator, maybe I didn't notice it.
Thanks Y_Less, I really apreciate this. :RESPECT:

See you later

almighty
05/09/2007, 05:08 PM
i see that you follow mi recomendation xD im going to use it whit the FuelS script :P

JaTochNietDan
05/09/2007, 06:03 PM
This is nice. Added to Funserver 8)

almighty
05/09/2007, 06:10 PM
hey dint work for me xD now that i go to test wont work i see the source and i can see that when you enter in a twotruck it displays a messege but wen i enter to the two truck id doesnt whi? how can i fix that?

JaTochNietDan
05/09/2007, 06:11 PM
Its only for tow trucks, not 18 wheelers.

zeruel_angel
05/09/2007, 06:28 PM
hey dint work for me xD now that i go to test wont work i see the source and i can see that when you enter in a twotruck it displays a messege but wen i enter to the two truck id doesnt whi? how can i fix that?

If you have many FS in your gamemode, some events may get bugged and not being call. try changing the place of this FS in you FilterScript line oin server.cfg.
It work with TOW TRUCK MODEL ID (525), it ca have ANY vehicle id, as long it is a TOW TRUCK like in the screenshot.


http://forum.sa-mp.com/index.php?topic=8301.msg67577#msg67577

THANKS for the link, it was really HELPFUL! now I will practise a little and will try to figurate how to use it. Anyway its not really clear to me how it work with the keys but DON'T bother, I will figure it out later on my own. Thanks for your help and time!

See you later!

zeruel_angel
05/09/2007, 07:27 PM
Thanks for the hint! ;) I suspected that from a begining, no wonder why the key defines are "exponencial".

See you later!

onehels
05/09/2007, 07:37 PM
zeruel_angel SPS for new link!
Script very great! All work good!

zeruel_angel
05/09/2007, 11:36 PM
zeruel_angel SPS for new link!
Script very great! All work good!

Sorry I don't understand, what SPS means?

See you later!

onehels
06/09/2007, 09:43 AM
SPS - this is senks! :D

zeruel_angel
06/09/2007, 05:58 PM
SPS - this is senks! :D

Thanks, now I don't know what "senks" means, google didn't helped to much, but at least now I know that is a good thing. THANKS!

See you later!

onehels
06/09/2007, 06:07 PM
sorry, I bad new english? and I saw my mistake!
SPS - THANKS :D

almighty
06/09/2007, 07:17 PM
HELP dont work to me!!!!

zeruel_angel
06/09/2007, 09:52 PM
HELP dont work to me!!!!

>_> can you be a little more especific?


See you later!

Spilot
06/09/2007, 10:04 PM
Great, Your All Scripts Are Useful.

almighty
06/09/2007, 11:48 PM
ok ok i already fix it :d

zeruel_angel
07/09/2007, 04:07 AM
ok ok i already fix it :d

What was it? should I fix something in the code?

See you later!

Maikel
07/09/2007, 06:01 AM
zeruel_angel, its nice ;)

http://members.lycos.nl/sgpower/tow1.PNG
http://members.lycos.nl/sgpower/tow2.PNG

:D

zeruel_angel
07/09/2007, 03:31 PM
HAHAHA you make me laught with that ScreenShots! hahaha.
If you wanna do soemthing stupid, make a command to attach vehicles and create 4 or 5 "606" vehicles they are little trailers, I used to drive around with 5 or 6 attached to my car! They work very well with the "airport litle car".
I will post some SS later.

BTW if you use your NUMPAD with 8 and 2 you can move the hok up and down, and if you put it all the wy down it will release the car, sorry o forgot to tell that.

See you later!

thats_not_me
08/09/2007, 03:03 AM
Thank you verry much for this script, i will use it in my server ;-)

Aussie Gameserver

zeruel_angel
08/09/2007, 07:24 AM
Thank you verry much for this script, i will use it in my server ;-)

Aussie Gameserver

THANKS I'm glad that you liked it.

Hi! as I promise, here are the ScreenShoots!
http://img525.imageshack.us/img525/4779/samp087bg9.th.png (http://img525.imageshack.us/my.php?image=samp087bg9.png)http://img341.imageshack.us/img341/760/samp088qh6.th.png (http://img341.imageshack.us/my.php?image=samp088qh6.png)http://img179.imageshack.us/img179/2395/samp090yf4.th.png (http://img179.imageshack.us/my.php?image=samp090yf4.png)http://img392.imageshack.us/img392/3284/samp091xp6.th.png (http://img392.imageshack.us/my.php?image=samp091xp6.png)http://img179.imageshack.us/img179/3937/samp089nj7.th.png (http://img179.imageshack.us/my.php?image=samp089nj7.png)

See you later!

thats_not_me
08/09/2007, 07:56 AM
Also, i had to fix it, it wasnt saying the ID Properly... when you type /towme

It sends a message to the towers, but it wasnt saying the id.

in the line change it from &d, to %d

zeruel_angel
08/09/2007, 08:00 AM
Also, i had to fix it, it wasnt saying the ID Properly... when you type /towme

It sends a message to the towers, but it wasnt saying the id.

in the line change it from &d, to %d

Ups! THANKS PAL FOR SAYING IT! a lot other ppl downloaded it and noone said anything :(

See you later!

Ignas1337
08/09/2007, 05:49 PM
does it work just with the towtruck or with TRACKTOR as well?

zeruel_angel
08/09/2007, 10:31 PM
does it work just with the towtruck or with TRACKTOR as well?

Sorry, only with the TOWTRUCk (model id = 525)
But you can change this, edit lines -> (31) and (61)
You ca also change the messages and the command and then and save it in a diferent file so you will have a TOW truck FS and a tracktor FS.(as long as you change the commands, they will work together with out bugging)

See you later!

BeckzyBoi
08/09/2007, 11:23 PM
zeruel_angel i hope you aren't offended by this as afterall you said in a pm to me that if i could help you then please do so, so i downloaded your source and went through it and i must be honest by saying it was the worst put together code i have ever seen for a long long time. First there was the complete lack of indentation and then not to mention the over and irrelevant use of braces/brackets, the oversized arrays when you were only using a small percentage of the cells, setting values of variables to the same value.. i could go on. So not to be offensive as i did it to help you i have made it a great deal more efficient and used as little as possible but to give the same constructive effects in game. Here is the new source, i advise people to use this instead:

- Click! (http://pastebin.com/f5bebb8d3)

Cheers, BeckzyBoi.

zeruel_angel
09/09/2007, 12:05 AM
zeruel_angel i hope you aren't offended by this as afterall you said in a pm to me that if i could help you then please do so, so i downloaded your source and went through it and i must be honest by saying it was the worst put together code i have ever seen for a long long time. First there was the complete lack of indentation and then not to mention the over and irrelevant use of braces/brackets, the oversized arrays when you were only using a small percentage of the cells, setting values of variables to the same value.. i could go on. So not to be offensive as i did it to help you i have made it a great deal more efficient and used as little as possible but to give the same constructive effects in game. Here is the new source, i advise people to use this instead:

- Click! (http://pastebin.com/f5bebb8d3)

Cheers, BeckzyBoi.


Thanks! I will analyze this and try to be a better coder.
BTW I like my identation style :s and I don't see the problem of the extra brackets :|
Anyway THANKS YOU VERY MUCH!

See you later!

IJzerenRita
09/09/2007, 10:53 AM
Now I have comments on both your source codes.

@zeruel_angel: your indenting is weird. The correct way is shown by BeckzyBoi.

@BeckzyBoi: Coding more "efficiently" (leaving out {} for example on single-statement ifs) does not make the code compile smaller or execute faster. The code should be as readable as possible. Using {}s is a good thing.

Check it out: http://pastebin.com/f71b65c6f http://pastebin.com/f1f7e93df (fixed some typos ;) )

Also, BeckzyBoi's version contains a little bug (see my source code). zeruel_angel's version will work fine.

BeckzyBoi
09/09/2007, 01:32 PM
new TowTruckers = 0; // BeckzyBoi removed '= 0' here. However, adding '= 0' makes it more clear to the readers. This does not affect the way this statement is compiled.
new bool:IsTowTrucker[MAX_PLAYERS]; // I added the 'bool' tag to make clear that this is a boolean variable, not a random integer.
new variables are auto assigned to the value of 0!!

print("\n TowCars Script UnLoaded\n**************************************** ****\n\n");
return 1;
/* BeckzyBoi changed this into 'return print(...)'. However, the pdf does not specify what print returns, so it could be anything. That means it's totally unreliable. We do not want to return anything, we specifically want to return 1. */
Well how about you test it then you will know what it returns because as you said the pawn-lang doesn't tell you but testing it would and that is what i did!!

if(newstate == PLAYER_STATE_DRIVER) { // Based on experience, I can tell you that using the '{' on same line as the 'if' improves readability significantly.
No it doesn't..! It also isn't proper indentation for all you might not get a warning for it.

IsTowTrucker[playerid] = true; // Changed to 'true' instead of '1'. This makes clear to the readers that is a boolean variable.
TowTruckers++; // Keep the variable and '++' together. Adding a space may be confusing.
To be quite frank that doesn't make a blind bit of difference!

else if(TowTruckers > 0) { // Always use {}s for if-statements, loops, etc.! Not using that makes your code look very sloppy and less readable. Furthermore, it will save you some time when adding multiple statements.
Why use what you don't need!!

For 'else if' statements it's acceptable to omit the {}s after 'else'.
Although it isn't needed..

else if(newstate == PLAYER_STATE_ONFOOT && IsTowTrucker[playerid]) { // I changed this to 'else if'. It is unnecessairy to execute another if-statement if a previous one was satisfied. BeckzyBoi removed some ()s and '==1' to make the statement more readable.
IsTowTrucker[playerid] = false; // BeckzyBoi used multiple statements on one line to make sure that the braceless if-statement works. One statement per line makes the code more readable.
Not needed.. by this point i am sure you are changing stuff that do the same thing to make it look like i did it wrong..

new playerVid = GetPlayerVehicleID(playerid); // GetPlayerVehicleID(playerid) seems to be called a lot. I saved the value in a variable now, so that we do not have to call that function all the time. This makes the code execute a little faster.
No it doesn't..

if ((newkeys & KEY_ACTION) && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && GetVehicleModel(playerVid) == 525) { // Changed to newkeys & KEY_ACTION to make it work even if other keys are pressed, and merged two if-statements
There isn't a right or wrong way to do this, as zeruel_angel had it like that i assumed that was how he wanted it to be.

new Float:pX,Float:pY,Float:pZ; // BeckzyBoi changed this into a 6-cell array. That makes the code in the if-statement below impossible to understand. Variables have names for a reason. Using an array here doesn't make the code compile more efficiently.
Omg you FUCKING noob, just gtfo of here.

for(new vid = 0; vid < MAX_VEHICLES; vid++) { // Using a for-loop instead of a while loop in this case makes it very clear to the reader what it does. It also makes your code very clean. I removed the '!Found' expression. It is unnecesairy. (See why later.)
new Float:vX,Float:vY,Float:vZ; // These variables have to be defined in this loop only. There are not needed anywhere else, and that's why I moved them here. In technical terms: I limited the scope of those variables.
Why the hell are you setting the new variable to 0 again when it is auto assigned!!

break; // Break! We can break out of a loop with this statement. That's why '!Found' is unnecesairy in the loop condition.
No it wasn't unnecessary.

if (!Found) { // At this part, BeckzyBoi got confused by zeruel_angel's weird indentation. It shows perfectly that zeruel_angel's will confuse the reader ;). BeckzyBoi thought this if-statement was part of the loop, but it isn't. This comes AFTER the loop.
Which is the whole idea..

IsTowTrucker[playerid] = false; // Changed to 'false' instead of '1', changed multiple-statement issue again.
false is the same as 0 but zeruel_angel had it set to 1 so...

if (strcmp(cmdtext, "/TowMe", true) == 0) { // BeckzyBoi changed this to '!...', which is also correct, but confusing with non-boolean return values.
It is the same bloody thing but takes up less space!! The way i had it was still checking if it was false i.e the strings were an equal!!

SendClientMessage(playerid, 0xFFFF00AA, "Sorry there isn't any TowTrucker Available at the moment"); // BeckzyBoi used his 'quick-return' thing here again. Again, there is no specification on what this function returns. However, it will probably return 0, which proves my point. We need to return 1 here, to make sure the 'Unknown command' message doesn't show up.
Yes i know pawn-lang doesn't tell you, that is why i tested it WHICH YOU OBVIOUSLY HAVN'T!


IJzerenRita i think you should just leave this thread before you make an even bigger fool of yourself and to everybody out there i advise you still use my code and not his as he has just edited mine and made it a whole lot worse. So here is the one to use which is also in my last post.

- Click! (http://pastebin.com/f5bebb8d3)

Cheers.

IJzerenRita
09/09/2007, 02:19 PM
new TowTruckers = 0; // BeckzyBoi removed '= 0' here. However, adding '= 0' makes it more clear to the readers. This does not affect the way this statement is compiled.
new bool:IsTowTrucker[MAX_PLAYERS]; // I added the 'bool' tag to make clear that this is a boolean variable, not a random integer.
new variables are auto assigned to the value of 0!!

I know. I said it improves readabilty, nothing else.


print("\n TowCars Script UnLoaded\n**************************************** ****\n\n");
return 1;
/* BeckzyBoi changed this into 'return print(...)'. However, the pdf does not specify what print returns, so it could be anything. That means it's totally unreliable. We do not want to return anything, we specifically want to return 1. */
Well how about you test it then you will know what it returns because as you said the pawn-lang doesn't tell you but testing it would and that is what i did!!

You missed my point here. If you test it, you know what it returns. However, the one that created that print function may decide to change it. They would like to return 123 now, and then your code breaks. That's why I say never to rely on such things if it isn't specified.


if(newstate == PLAYER_STATE_DRIVER) { // Based on experience, I can tell you that using the '{' on same line as the 'if' improves readability significantly.
No it doesn't..! It also isn't proper indentation for all you might not get a warning for it.

It is proper indentation. Using a { on the same line is very common in coding. The Pawn compiler also compiles this without giving an indentation warning.


IsTowTrucker[playerid] = true; // Changed to 'true' instead of '1'. This makes clear to the readers that is a boolean variable.
TowTruckers++; // Keep the variable and '++' together. Adding a space may be confusing.
To be quite frank that doesn't make a blind bit of difference!

True. I just think that removing the space avoids confusion.


else if(TowTruckers > 0) { // Always use {}s for if-statements, loops, etc.! Not using that makes your code look very sloppy and less readable. Furthermore, it will save you some time when adding multiple statements.
Why use what you don't need!!

It adds to readability. Coding isn't just blindly ramming you keyboard. It it very important that it's readable. And, as I said: it will save you some time when adding multiple statements.


For 'else if' statements it's acceptable to omit the {}s after 'else'.
Although it isn't needed..

True.


else if(newstate == PLAYER_STATE_ONFOOT && IsTowTrucker[playerid]) { // I changed this to 'else if'. It is unnecessary to execute another if-statement if a previous one was satisfied. BeckzyBoi removed some ()s and '==1' to make the statement more readable.
IsTowTrucker[playerid] = false; // BeckzyBoi used multiple statements on one line to make sure that the braceless if-statement works. One statement per line makes the code more readable.
Not needed.. by this point i am sure you are changing stuff that do the same thing to make it look like i did it wrong..

No, I said that multiple lines on one statement makes your code less readable. So, I changed it into two lines.


new playerVid = GetPlayerVehicleID(playerid); // GetPlayerVehicleID(playerid) seems to be called a lot. I saved the value in a variable now, so that we do not have to call that function all the time. This makes the code execute a little faster.
No it doesn't..

It does. Calling a function takes way more time than reading a variable. Read the Pawn Implementor's Guide for more information about this.


if ((newkeys & KEY_ACTION) && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && GetVehicleModel(playerVid) == 525) { // Changed to newkeys & KEY_ACTION to make it work even if other keys are pressed, and merged two if-statements
There isn't a right or wrong way to do this, as zeruel_angel had it like that i assumed that was how he wanted it to be.

I never said that that it's right or wrong. Remember that I'm not commenting on your source specifically. I comment on zeruel_angel's as well.


new Float:pX,Float:pY,Float:pZ; // BeckzyBoi changed this into a 6-cell array. That makes the code in the if-statement below impossible to understand. Variables have names for a reason. Using an array here doesn't make the code compile more efficiently.
Omg you FUCKING noob, just gtfo of here.

No need to swear. Calling variables 'pX' and 'vX' makes more sense than 'pos[0]' and 'pos[3]' to readers of the code.


for(new vid = 0; vid < MAX_VEHICLES; vid++) { // Using a for-loop instead of a while loop in this case makes it very clear to the reader what it does. It also makes your code very clean. I removed the '!Found' expression. It is unnecesairy. (See why later.)
new Float:vX,Float:vY,Float:vZ; // These variables have to be defined in this loop only. There are not needed anywhere else, and that's why I moved them here. In technical terms: I limited the scope of those variables.
Why the hell are you setting the new variable to 0 again when it is auto assigned!!

break; // Break! We can break out of a loop with this statement. That's why '!Found' is unnecesairy in the loop condition.
No it wasn't unnecessary.

It wasn't indeed. But now it is, since I introduced a break. It wasn't there before.


if (!Found) { // At this part, BeckzyBoi got confused by zeruel_angel's weird indentation. It shows perfectly that zeruel_angel's will confuse the reader ;). BeckzyBoi thought this if-statement was part of the loop, but it isn't. This comes AFTER the loop.
Which is the whole idea..

Let me rephase: in zeruel_angel's code, the if-statement was in the right place. In your code you put it INSIDE the loop. I think this happened because you (understandably) misinterpreted the indentation in his code. I corrected that.


IsTowTrucker[playerid] = false; // Changed to 'false' instead of '1', changed multiple-statement issue again.
false is the same as 0 but zeruel_angel had it set to 1 so...

Yes, true = 1 and false = 0. However, I changed this variable into boolean at the top of the script. That's why I need 'false' instead of 0.
I meant to say "'false' instead of '0'" in that comment. I made a typo.


if (strcmp(cmdtext, "/TowMe", true) == 0) { // BeckzyBoi changed this to '!...', which is also correct, but confusing with non-boolean return values.
It is the same bloody thing but takes up less space!! The way i had it was still checking if it was false i.e the strings were an equal!!

Correct. I'm just saying that it might be confusing.


SendClientMessage(playerid, 0xFFFF00AA, "Sorry there isn't any TowTrucker Available at the moment"); // BeckzyBoi used his 'quick-return' thing here again. Again, there is no specification on what this function returns. However, it will probably return 0, which proves my point. We need to return 1 here, to make sure the 'Unknown command' message doesn't show up.
Yes i know pawn-lang doesn't tell you, that is why i tested it WHICH YOU OBVIOUSLY HAVN'T!

Same thing.


IJzerenRita i think you should just leave this thread before you make an even bigger fool of yourself

No, I wish to have a nice discussion about this. Trying to scare me away beforehand shows the opponent's weakness.

I have a lot of experience in programming. Not just Pawn, but kinda all modern languages.
Most of the opinions I express are based on that experience.


- Click! (http://pastebin.com/f5bebb8d3)

Your code still has the bug. I'll give you a hint: try to tow when there is no car around. Tell me when you don't have 700 "There is no car in range." messages in your chatbox.

If you try to flame again by calling me a 'n00b' or something, you dismiss yourself from this discussion.

dacads
09/09/2007, 02:22 PM
maybe both of you should stop fighting like a bunch of kids ;)

IJzerenRita
09/09/2007, 02:24 PM
You may misunderstand. It's not fighting. All I'm doing is expressing opinions and some facts.

dacads
09/09/2007, 02:26 PM
You may misunderstand. It's not fighting. All I'm doing is expressing opinions and some facts.


ok .... but this forum is not for expressing opinions and facts

BeckzyBoi
09/09/2007, 02:28 PM
Yeah dacads is right. Although i may think mine is the best way and you think yours is we don't have to say it and ruin zeruel_angel's thread. So lets keep it buttoned from now on, unless of coarse you want to continue and make this an argument on your side, else i am saying nothing more on the subject.

IJzerenRita
09/09/2007, 02:35 PM
OK, that sounds reasonable. If you like, we can discuss this further elsewhere.

dacads
09/09/2007, 02:38 PM
yeah u could discuss it on msn instead of ruining other peoples life's lol

zeruel_angel
10/09/2007, 01:39 AM
I do like that ppl post their opinion of my code in my thread :), specially if the say why and post and example :D.
I don't like ppl to fight because of me.
Anyway, thanks for your opinions :), they will help me improve my work! :mrgreen:

Thanks everybody!

See you later!

GTAIV
12/09/2007, 02:41 PM
What's the ACTION KEY?

BeckzyBoi
12/09/2007, 05:02 PM
Click! (http://forum.sa-mp.com/index.php?topic=29345.msg205301#msg205301)

zeruel_angel
12/09/2007, 05:02 PM
It depends on how you configurated your GTA, you can go to options and see your keyboard/joystick configuration and look in there under "vehicle control" wich is the action key. In my case I use CTRL but I have changed this, so I don't know wich one is in your game...

See you later!

BeckzyBoi
12/09/2007, 05:05 PM
You say "See you later!" after each post and it is so annoying as in actual fact we all see you again 2 minutes later along with the same phrase again!

zeruel_angel
12/09/2007, 05:41 PM
Did you know that for personal and off-topic things ppl invented something called "Personal message" ;)? often call "PM" :o like in game the commad /PM.
Anyway I don't see the problem? at least it is true... for me 2 minutes is "later" (actually 250 ms is later for me) (xD sorry BAD joke, BAD joke)(anyway my code isn't so effiecient to make thiskind of joke)

:arrow: If your nickname is [MW]BeckzyBoi
{
"goodbye!"
}
else
{
"See you later!"
}

BeckzyBoi
12/09/2007, 05:55 PM
I would prefer:

new phr[][] = {
"Goodbye", "See you later",
"Cheerio", "Adios", "Laterz",
"Catch ya later", "Cya"};

public Whenzeruel_angelMakesAPost()
{
UseRandomGreeting(phr[random(7)]);
print("BeckzyBoi is now happy =)");
return 1;
}

zeruel_angel
12/09/2007, 06:00 PM
You are always the same :) hehe

Hasta luego!

Maikel
13/09/2007, 03:53 PM
HAHAHA you make me laught with that ScreenShots! hahaha.
If you wanna do soemthing stupid, make a command to attach vehicles and create 4 or 5 "606" vehicles they are little trailers, I used to drive around with 5 or 6 attached to my car! They work very well with the "airport litle car".
I will post some SS later.

BTW if you use your NUMPAD with 8 and 2 you can move the hok up and down, and if you put it all the wy down it will release the car, sorry o forgot to tell that.

See you later!


:D
Have you a server? So yes what's IP?

zeruel_angel
13/09/2007, 04:19 PM
Sorry, but it is not a public server as I don't have a 24/7 host. I only host it by time by time to play with some close friends, and as I have dinamic IP giving you my IP won't help you at all ._. Y usuallu use the server name "zeruel_angel test server" and the game mode "ciudad:Las Venturas"

See you later!

Maikel
13/09/2007, 05:13 PM
Thnx ;)

X_Cutter
06/10/2007, 07:55 PM
Adios amigos

[GTA]
07/10/2007, 09:34 AM
Where do i find a tow truck
When i type
/TowMe
It says a towertruck aint availible at the moment

X_Cutter
07/10/2007, 10:53 AM
]
Where do i find a tow truck
When i type
/TowMe
It says a towertruck aint availible at the moment


Towtrucks are vehicles. You must use /towme only if people is in that vehicle. If you suck at scripting and wish to add vehicles to the gamemode, read the wiki.

Luciffer
03/07/2008, 08:24 PM
sorry for grab out this FilterScript but

can anyone tell me how i can make it possible to make a sign on the map when a player makes /towme. only towcar driver can see it


HELP^^

Luciffer

cruising
07/07/2008, 03:59 PM
after u have tow with action key...how do u realese the car again? if i press the action key it tow again and not drop it..any command?

ThePro
18/07/2008, 10:24 AM
good script i love it i made the biggest tow ever with it http://forum.sa-mp.com/index.php?topic=66480.0

zeruel_angel
21/07/2008, 03:40 PM
HI!

1 The action key usually is CTRL you can check it in your game options.

2 In order to use the script you need to spawn a tow truck car.

3 To release a car use your NUMPAD, 2 and 8 make the hook go up and down, when it reach the floor it will release the car, please notice that in order to tow car again you will need to pull the hook up again.

4 In my server we made a really long tow truck chain (with scripting) but you CANT drive it, is to much inestable :P

See you later!

[D1zZy_vortex]
22/07/2008, 06:26 AM
nice script

but link died.. i can get it frmo pastb and cant from first site

re upload it please

zeruel_angel
22/07/2008, 09:15 AM
Hi! the download link worked for me :P please try again if you still have problems i can upload it again somewhere else... like this -> http://pastebin.com/f12cb95cf

See you later!

[D1zZy_vortex]
22/07/2008, 10:55 AM
Hi! the download link worked for me :P please try again if you still have problems i can upload it again somewhere else... like this -> http://pastebin.com/f12cb95cf

See you later!


yh problem stay but i got it from u ;) thnx m8

master of dragons
22/07/2008, 10:58 AM
Nice man. :o

Mikep
22/07/2008, 10:59 AM
Why is this in Gamemodes? :s

zeruel_angel
22/07/2008, 01:06 PM
Why is this in Gamemodes? :s

Because this treadh is pretty old, prior to the forum change, and in that old days there where only one subforum to post script, so I think that the moderators coudn't move ALL the non-gamemode script out of the subforum. Maybe I should ask someone to move it.

See you later!

error55o
08/10/2008, 04:17 PM
thanks dude, love this but wish you'd combine all your mini missions with this xD

CrackBrained
09/10/2008, 12:44 PM
You've probably forgotten:
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);

I added it in my script. Shows now name of help needing player too.

MenaceX^
09/10/2008, 02:59 PM
Usfel FS, Gotta try it!

Dizx
18/10/2008, 11:22 AM
Thats koo FS. Im using it in my server

mmmaxi
06/11/2008, 10:36 PM
Good work but can you do that when i tow a car i than again type CTRL that is than not anymore towed!


Thx

mmmaxi
07/11/2008, 12:12 AM
Good work but can you do that when i tow a car i than again type CTRL that is than not anymore towed!


Thx

Just use DetachTrailerFromVehicle.

And damn, your signature is huge!


can you pls send me the finish code im not so good at scripting

thx so much

mmmaxi
07/11/2008, 07:27 PM
pls help me i dont know how i do it

Good work but can you do that when i tow a car i than again type CTRL that is than not anymore towed!


Thx

Just use DetachTrailerFromVehicle.

And damn, your signature is huge!


pls help me i dont know how i do it

QuiteSnK
18/01/2009, 02:16 PM
I need a mirror. Please

QuiteSnK
18/01/2009, 04:09 PM
[quote=Marcel ]

Thank you very much ;)

gtalover12
23/02/2009, 08:51 PM
OMFG :( i need this FS for my server, iv'e added it to the FIRSt in my filterscripts line in my server.cfg

its in my filterscripts folder, it says it's loaded.

wen i try to hook a car up * spawned car * with ANY button on my keyboard nothing happens :|
can someone tell me why?? i SOOO need this.... PLEASE :) ill give a cookie..... ;)

Exclikers
14/04/2009, 05:38 PM
any mirrors plz? i cant download

matty123454
14/04/2009, 07:56 PM
can u re-upload it dude i cant grab it any where :D thanks!

chaosnz
21/04/2009, 10:35 AM
im wondering if theres anyway to increase the distance between the "towtruck" and the "towed car"?

[IB]Scorcher
21/04/2009, 05:14 PM
Wow, horrible Identation.

sTreTcheD
09/08/2009, 11:38 AM
What key i need to use to tow a car?

Sergei
09/08/2009, 01:06 PM
CTRL (default one).

Karl115
09/08/2009, 05:21 PM
I can't download why?

BP13
09/08/2009, 11:07 PM
I can't even think of a file hoster that is as worst as savefile

Rajeev
17/10/2009, 06:15 PM
TOW ANY CAR FS

With this FilterScript, you can tow any car (exept for bike, they can't be towed in ANY way). You enter a Tow Truck (model id 525) and you are told that you can tow cars with your ACTION KEY (remember that for optimal key reading, you must release other keys before hitting the desire key) You must be quite near the car.
If you want your car to be towed, you use "/TowMe" and if there is anyone in a towtruck he will be told about your situation, if not, you will be told that there issn't any tow trucker available at the moment.

ITS VERY SIMPLE, i just was asked for it, so here it its.
BTW here are some SS
http://img413.imageshack.us/img413/1493/samp017qm5.th.png (http://img413.imageshack.us/my.php?image=samp017qm5.png)http://img48.imageshack.us/img48/8553/samp018cq0.th.png (http://img48.imageshack.us/my.php?image=samp018cq0.png)

download Link:
English Version -> http://www.savefile.com/files/1038880

BUGS: I put "id:&d" and it should be "id:%d" sorry, fixed that, change it(line 115) or re-download. (thanks ThaT_NoT_mE )

post here if you find any bug (YOU WILL ITS A PROMISE ;) )

See you later!



I cannot download it :roll:

Floul1
23/10/2009, 08:26 PM
Pastebin http://pawn.pastebin.com/f61380f8a

BP13
23/10/2009, 10:00 PM
freaking terrible indenting. I wonder how it even compiled.

Globe2009
01/11/2009, 01:10 PM
nice FS dude i like it alot

Cedimedi
01/11/2009, 07:58 PM
Please reupload it, the upper have some updates or something like that :mrgreen:

ZabarXD
01/11/2009, 08:22 PM
Ok. i'm upload
http://pastebin.com/f12b60863

iskill
02/11/2009, 12:24 AM
Thanks for the hint! Wink I suspected that from a begining, no wonder why the key defines are "exponencial".

See you later!

mihais17
02/11/2009, 02:49 PM
Nice man !

jerR
04/11/2009, 04:36 PM
Nice script but I get the message no car in range even if I let a friend call one and try to tow the car he's in.

Solution?

thimo
10/11/2009, 07:51 PM
GET THE LINK WORKING NOOB!

BP13
10/11/2009, 08:41 PM
GET THE LINK WORKING NOOB!


wow looks like your the noob. Are you blind or something?


Ok. i'm upload
http://pastebin.com/f12b60863

Johny_Depp
10/11/2009, 10:19 PM
great work tnx.

driftking180
06/12/2009, 04:30 PM
link dont works :(

driftking180
06/12/2009, 04:47 PM
hell i cant download

Fj0rtizFredde
06/12/2009, 04:53 PM
hell i cant download

Read the post above you...

Ok. i'm upload
http://pastebin.com/f12b60863

driftking180
06/12/2009, 05:02 PM
Thanks for the hint! ;) I suspected that from a begining, no wonder why the key defines are "exponencial".

See you later!


I cant download it :( links doesnt work

BP13
06/12/2009, 05:12 PM
Thanks for the hint! ;) I suspected that from a begining, no wonder why the key defines are "exponencial".

See you later!


I cant download it :( links doesnt work


Maybe if your used your brain to see that theres the same working link posted about 5 times on this page.

UnHead
06/12/2009, 07:27 PM
What download this FS? :o

BP13
07/12/2009, 12:04 AM
What download this FS? :o


http://pastebin.com/f12b60863

hantuafiq2
07/12/2009, 01:54 PM
Not Found
The requested URL /files/1038880 was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.8 Server at www.savefile.com Port 80

Chance
07/12/2009, 06:08 PM
Good. =)

BP13
07/12/2009, 10:31 PM
Not Found
The requested URL /files/1038880 was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.8 Server at www.savefile.com[/url] (http://)[url=http://] Port 80


I literally think your blind look right above your post.

pierhs
02/01/2010, 02:56 PM
How can i make to attach the trailer when I press the numpad 2 button?

[03]Garsino
02/01/2010, 02:58 PM
How can i make to attach the trailer when I press the numpad 2 button?


change "KEY_ACTION" to "KEY_SUBMISSION"

Crusher!!
03/01/2010, 02:42 AM
Link = broken

[03]Garsino
03/01/2010, 10:55 AM
Link = broken


If you could have checked last page you would have seen a link ....
http://pastebin.com/f12b60863

BP13
03/01/2010, 11:22 AM
Garsino ]

Link = broken


If you could have checked last page you would have seen a link ....
http://pastebin.com/f12b60863


not to mention my giant pastebin link with 50 size font.

r4z0rJebiVjetar
03/01/2010, 11:24 AM
Oh there is pastebin :D thx
Nice script .

UnHead
03/01/2010, 12:02 PM
Thanks ;)

zeruel_angel
11/01/2010, 02:52 AM
Reuploaded to a diferent server :P

See you later!

BP13
11/01/2010, 03:15 AM
Reuploaded to a diferent server :P

See you later!


BP13 ]

What download this FS? :o


http://pastebin.com/f12b60863

Street_King
21/01/2010, 02:59 PM
NICE idea for rp!!!

BP13
03/03/2010, 02:20 AM
Here's a new link with PAWN highlighting.



http://pastebin.com/aBaYHFmQ

MahmutBey
13/03/2010, 11:00 AM
Firstly Thanks for FS,

While I keep a vehicle, How I unkeep..?

Juanxz
22/03/2010, 07:28 AM
Firstly Thanks for FS,

While I keep a vehicle, How I unkeep..?


You just enter the other vehicle and move with it to unhook it.

Lookin
14/10/2010, 10:54 AM
its good but most cars dont attach ill be literally bumper to bumper and it says car isnt in range how would You/Myself go about fixing that?

dinik
27/10/2010, 04:00 AM
TOW ANY CAR FS

With this FilterScript, you can tow any car (exept for bike, they can't be towed in ANY way). You enter a Tow Truck (model id 525) and you are told that you can tow cars with your ACTION KEY (remember that for optimal key reading, you must release other keys before hitting the desire key) You must be quite near the car.
If you want your car to be towed, you use "/TowMe" and if there is anyone in a towtruck he will be told about your situation, if not, you will be told that there issn't any tow trucker available at the moment.

ITS VERY SIMPLE, i just was asked for it, so here it its.
BTW here are some SS
http://img413.imageshack.us/img413/1493/samp017qm5.th.png (http://img413.imageshack.us/my.php?image=samp017qm5.png)http://img48.imageshack.us/img48/8553/samp018cq0.th.png (http://img48.imageshack.us/my.php?image=samp018cq0.png)

download Link:
English Version on a zip file (http://zeruel.vndv.com/samp/almacen/TowCars.zip)
English Version on PasteBin (http://pastebin.com/f12b60863)


BUGS: I put "id:&d" and it should be "id:%d" sorry, fixed that, change it(line 115) or re-download. (thanks ThaT_NoT_mE )

post here if you find any bug (YOU WILL ITS A PROMISE ;) )

See you later!

It only tows police cars not any other kinds....

Lookin
27/10/2010, 09:45 AM
it can tow taxi's and some other cars but not many

Dj_maryo1993
28/10/2010, 02:55 AM
de-atach does not work

DokerJr
28/10/2010, 08:21 AM
format(msg,sizeof(msg),"*** %s (id:&d) Need to be Towed ***",pName,playerid);
GetPlayerName(playerid,pName,sizeof(pName));


Replace with %d

Kyle_Olsen
30/10/2010, 07:06 AM
Found a bug, and fixed it.

The vehicle did not deattatch when you pressed action when a vehicle was attatched.

Line 76:
if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(pla yerid)))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(player id));
}
AttachTrailerToVehicle(vid,GetPlayerVehicleID(play erid));

SendClientMessage(playerid,0xFFFF00AA,"Car towed!");
}

Replace it with this:
if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(pla yerid)))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(player id));
}else{
AttachTrailerToVehicle(vid,GetPlayerVehicleID(play erid));
}
SendClientMessage(playerid,0xFFFF00AA,"Car towed!");
}

Dylan_Madigan69
29/06/2011, 01:55 AM
Suggestions:

1. Make the hook up button something other then space bar. This i useally use as a stability brake.. and id 2 is used for towing missions. You should make a new button for that.

2. -Half Bug- You dont always hook up to the car your backed up to. Is it possible to (when you hit the hook up buttion) put an arrow above the closest cars you can hook up to and either choose which one of the 2 or 3 ur attempting to hook up to or cancel?

Gangsta_Hotdog
21/08/2011, 05:11 PM
Nice, thanks!

MrEdinLaw
22/09/2011, 07:10 PM
Lol whats action key?

NoahF
10/09/2012, 10:00 PM
Nice script, I wish more servers would have this in their FilterScripts..

Qu3esL
11/09/2012, 08:52 AM
Great FS. good for catching robbers