[Include] RACInclude - Usefull functions to help you out
#1

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.
Reply
#2

Could you possibly post a pastebin link? That would be helpful.
Reply
#3

Pastebin added!
Reply
#4

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.
Reply
#5

Thanks! I will make it over!
Reply
#6

You made GetVehicleOccupier even worse.

Код:
GetPlayerVehicleSead(i) == 0
Mis sul sigadega on?
Reply
#7

Mis sul kirjavigadega on?
Reply
#8

You have a goddamn mistake there, fix it, it must be seat. Ma ei taha bдnni saada eesti keele pдrast
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)