[Include] RACInclude - Usefull functions to help you out - 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] RACInclude - Usefull functions to help you out (
/showthread.php?tid=444691)
RAC Include - Usefull functions to help you out -
RACGaming - 17.06.2013
RAC Include
Lots of usefull functions to help you out!
What is this?
RACInclude includes some functions to help you with getting player's zone, or if the vehicle is spawned, Getting player name, etc...
Functions
Quote:
GetPlayerZone(playerid);
IsVehicleSpawned(vehicleid);
IsVehicleOccuppied(vehicleid);
GetVehicleOccuppier(vehicleid);
GetPlayerIDByName(playername[]);
GetVehicleName(vehicleid);
IsVehicleBike(vehicleid);
PlayerName(playerid);
GetVehicleSpeed(vehicleid);
SetVehicleSpeed(vehicleid, speed);
|
Download
Mediafire:
http://www.mediafire.com/download/5x...racinclude.inc
Solidfiles:
http://www.solidfiles.com/d/24d98ec1a9/
Pastebin:
http://pastebin.com/4upSAUcf
Install
Download it and put this into your server pawno/include folder.
Put #include <racinclude> on top of your script, below #include <a_samp>
Updates
V0.2
Quote:
Updated GetVehicleOccupier and IsVehicleOccupied.
GetVehicleOccupier reads now only the Driver, not passengers.
|
V0.1
Quote:
GetPlayerZone(playerid);
IsVehicleSpawned(vehicleid);
IsVehicleOccuppied(vehicleid);
GetVehicleOccuppier(vehicleid);
GetPlayerIDByName(playername[]);
GetVehicleName(vehicleid);
IsVehicleBike(vehicleid);
PlayerName(playerid);
GetVehicleSpeed(vehicleid);
SetVehicleSpeed(vehicleid, speed);
|
Using it
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/zone", true))
{
new string[128];
format(string, sizeof(string), "Your current zone is: %s.", GetPlayerZone(playerid));
SendClientMessage(playerid, -1, string);
return 1;
}
return 0;
}
Bugs
Currently no bugs found.
Credits
SA-MP: The SA-MP Team.
Include: RACGaming.
Coder: RACGaming.
Testing: RACGaming.
Re: RACInclude - Usefull functions to help you out -
Cameryn - 17.06.2013
Could you possibly post a pastebin link? That would be helpful.
Re: RACInclude - Usefull functions to help you out -
RACGaming - 17.06.2013
Pastebin added!
Re: RACInclude - Usefull functions to help you out -
Jochemd - 18.06.2013
There are some flaws in this script. For example, GetVehicleOccupier would return the FIRST found player (so the one with the lowest ID) even though he might be a passenger.
Re: RACInclude - Usefull functions to help you out -
RACGaming - 18.06.2013
Thanks! I will make it over!
Re: RACInclude - Usefull functions to help you out -
kristo - 19.06.2013
You made GetVehicleOccupier even worse.
Код:
GetPlayerVehicleSead(i) == 0
Mis sul sigadega on?
Re: RACInclude - Usefull functions to help you out -
RACGaming - 20.06.2013
Mis sul kirjavigadega on?
Re: RACInclude - Usefull functions to help you out -
kristo - 20.06.2013
You have a goddamn mistake there, fix it, it must be seat. Ma ei taha bдnni saada eesti keele pдrast