SA-MP Forums Archive
[Include] S32_Rent - Create rent vehicle with just one line - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] S32_Rent - Create rent vehicle with just one line (/showthread.php?tid=317252)

Pages: 1 2


S32_Rent - Create rent vehicle with just one line - System64 - 10.02.2012

Introduction

Hi all
Just another script by me, easy making rent vehicles!
This script is not like other rent scripts with commands, when you drive rent vehicle every minute you must pay specific price!



Features

Functions
pawn Code:
/*

 • Function: CreateRentVehicle(modelid, Float: X, Float: Y, Float: Z, Float: A, Color1, Color2, Respawn_Delay, Price)
 • Usage: Creating rent vehicle!
 • Parameters:
        modelid: ID of vehicle
        X, Y, Z, A: position of vehicle
        Color1, Color2: color of vehicle
        Respawn_Delay: respawn delay of vehicle
        Price: price which player must pay when he enter rent vehicle (and every minute)
 • Example: CreateRentVehicle(411, 996.4219,-1856.0022,12.8203,276.0259, 3, 0, 60, 5000);
 
*/


/*

 • Function: DestroyRentVehicle(vehicleid)
 • Usage: Destroying rent vehicle!
 • Parameters:
        vehicleid: ID of vehicle
 • Example: DestroyRentVehicle(1);

*/


/*

 • Function: GetTotalRentVehicles()
 • Usage: Getting total created rent vehicles!
 • Parameters:
        vehicleid: ID of vehicle
 • Example: printf("Total rent vehicles loaded: %d", GetTotalRentVehicle());

*/


/*

 • Function: IsRentVehicle(vehicleid)
 • Usage: Checking is vehicle rent vehicle!
 • Parameters:
        vehicleid: ID of vehicle
 • Example: if(IsRentVehicle(1)) printf("Vehicle ID 1 is rent vehicle!");

*/


/*

 • Function: GetRentModelID(vehicleid)
 • Usage: Getting vehicle model of rent vehicle!
 • Parameters:
        vehicleid: ID of vehicle
 • Example: printf("Vehicle model of vehicle ID 1 is: %d", GetRentModelID(1));

*/


/*

 • Function: GetRentPos(vehicleid, &Float: X, &Float: Y, &Float: Z)
 • Usage: Getting position of rent vehicle!
 • Parameters:
        vehicleid: ID of vehicle
        X, Y, Z: Parameters in which variables will be stored values
 • Example:
 new Float: Position[3];
 GetRentPos(1, Position[0], Position[1], Position[2]);
 printf("X: %f Y: %f Z: %f", Position[0], Position[1], Position[2]);

*/


/*

 • Function: GetRentZAngle(vehicleid, &Float: A)
 • Usage: Getting Z angle of rent vehicle!
 • Parameters:
        vehicleid: ID of vehicle
        A: Parameter in which variable will be stored value
 • Example:
 new Float: Position[1];
 GetRentZAngle(1, Position[0]);
 printf("A: %f", Position[0]);

*/


/*

 • Function: GetRentColor(vehicleid, &C1, &C2)
 • Usage: Getting color 1 & color 2 of rent vehicle!
 • Parameters:
        vehicleid: ID of vehicle
        C1, C2: Parameters in which variables will be stored values
 • Example:
 new Float: Color[2];
 GetRentColor(vehicleid, Color[0], Color[1]):
 printf("Color 1: %d Color 2: %d", Color[0], Color[1]);

*/


/*

 • Function: GetRentRespawnDelay(vehicleid)
 • Usage: Getting respawn delay of rent vehicle!
 • Parameters:
        vehicleid: ID of vehicle
 • Example: printf("Respawn Delay: %d", GetRentRespawnDelay(1));

*/


/*

 • Function: GetRentPrice(vehicleid)
 • Usage: Getting price of rent vehicle!
 • Parameters:
        vehicleid: ID of vehicle
 • Example: printf("Price: %d", GetRentPrice(1));

*/


/*

 • Function: GetPlayerRentID(playerid)
 • Usage: Getting ID of rent vehicle in which is player!
 • Parameters:
        playerid: ID of player
 • Example: printf("ID: %d", GetPlayerRentID(playerid));

*/



/*

 • Function: IsPlayerInRentVehicle(playerid, vehicleid)
 • Usage: Checking is player in specific rent vehicle!
 • Parameters:
        playerid: ID of player
        vehicleid: ID of vehicle
 • Example: if(IsPlayerInRentVehicle(playerid, 1)) SendClientMessage(playerid, -1, "You are in rent vehicle 1");

*/


/*

 • Function: IsPlayerInAnyRentVehicle(playerid)
 • Usage: Checking is player in any rent vehicle!
 • Parameters:
        playerid: ID of player
 • Example: if(IsPlayerInAnyRentVehicle(playerid)) SendClientMessage(playerid, -1, "You are in some rent vehicle");

*/

Necessary things

y_hook by ******
y_timers by ******
foreach by ******



Download

Pastebin (v1.0.0)


Mediafire (v1.0.0)


Solidfiles (v1.0.0)



Credits

System32 - Almost everything
****** - y_hooks, y_timers & foreach



Re : S32_Rent - Create rent vehicle with just one line - Naruto_Emilio - 10.02.2012

Nice, good job.


Re: S32_Rent - Create rent vehicle with just one line - [XST]O_x - 11.02.2012

I hate it when an amazing piece of work comes to nothing with no comments.
Good job!


Re: S32_Rent - Create rent vehicle with just one line - urbaNRoots - 11.02.2012

amazing i was looking a script like this ,good job man


Re: S32_Rent - Create rent vehicle with just one line - [HK]Ryder[AN] - 11.02.2012

Amazing.


Re: S32_Rent - Create rent vehicle with just one line - System64 - 11.02.2012

Thanks guys, I'm giving my best


Re: S32_Rent - Create rent vehicle with just one line - fiki574 - 11.02.2012

Yet again very nice Include from you!


(now its starting to piss me off, not being able to give you rep+ :O)


Re: S32_Rent - Create rent vehicle with just one line - System64 - 11.02.2012

hah thanks, I can't give rep. to you too :/


Re: S32_Rent - Create rent vehicle with just one line - jameskmonger - 11.02.2012

I stopped reading at ", fuck that," being professional will really help you.


Re : S32_Rent - Create rent vehicle with just one line - falor - 01.03.2012

Can you explain how to use it please?


Respuesta: S32_Rent - Create rent vehicle with just one line - [Nikk] - 01.03.2012

exelent ! nice script


Re: S32_Rent - Create rent vehicle with just one line - Hancoc - 01.03.2012

Nice, good job.


Re: S32_Rent - Create rent vehicle with just one line - Marduk_Malverde - 01.03.2012

Awesome! good job


Re: S32_Rent - Create rent vehicle with just one line - Steven82 - 02.03.2012

Quote:
Originally Posted by jameskmonger
View Post
I stopped reading at ", fuck that," being professional will really help you.
I would like to second this. Being professional makes you...look better as a person as well.

Other than that, pretty well documented and explained. Didn't test it out, but looks good. Good job.


Re: S32_Rent - Create rent vehicle with just one line - System64 - 02.03.2012

Thanks guys
Quote:
Originally Posted by Steven82
Посмотреть сообщение
I would like to second this. Being professional makes you...look better as a person as well.

Other than that, pretty well documented and explained. Didn't test it out, but looks good. Good job.
Thank you too, I fixed that!


Re: S32_Rent - Create rent vehicle with just one line - jameskmonger - 02.03.2012

"Forget that" still sounds unprofessional. Just try "This rent system is different than the others - when you rent a vehicle, you must pay a specific price every minute."


Re: S32_Rent - Create rent vehicle with just one line - System64 - 02.03.2012

Oh man, simple I removed it!


Re : S32_Rent - Create rent vehicle with just one line - falor - 05.03.2012

Can you explain how to use it please?


Re: S32_Rent - Create rent vehicle with just one line - System64 - 05.03.2012

What to explain? Everything is in functions 'section' in this topic... read it!


Re: S32_Rent - Create rent vehicle with just one line - Mark_Weston - 06.03.2012

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
"Forget that" still sounds unprofessional. Just try "This rent system is different than the others - when you rent a vehicle, you must pay a specific price every minute."
No you don't.

There are different prices.

Type 1:few bucks per mile + fuel

Type 2ne price, for example Uhual. The trailers are one price EX:$300 etc.