08.07.2012, 19:03
(
Последний раз редактировалось Larceny; 08.07.2012 в 20:35.
)
Intro:
An include with several macros and functions to help scripting.
Advantages:
With it, you can save time and write functions faster and(or) you have new functions that can be useful.
Currently natives:
Example:
Thanks to:
SuperViper - Show me how to return a Float in a function.
Download:
Pastebin link.
Dropbox link.
An include with several macros and functions to help scripting.
Advantages:
With it, you can save time and write functions faster and(or) you have new functions that can be useful.
Currently natives:
pawn Код:
native SetPlayerPosEx(playerid, Float:x, Float:y, Float:z, Float:a);
native IsPlayerInRangeOfVehicle(playerid, vehicleid, Float: radius);
native GetPlayerDistanceFromVehicle(playerid, vehicleid);
native GetPlayerDistanceFromPlayer(playerid, targetid);
native TeleportPlayerToVehicle(playerid, vehicleid);
native TeleportPlayerToPlayer(playerid, targetid);
native SendAdminMessage(color, const message[]);
native SetVehicleInterior(vehicleid, interior);
native GivePlayerWantedLevel(playerid, level);
native RemovePlayerWeapon(playerid, weaponid);
native GetVehicleEngineStatus(vehicleid);
native SetPlayerMoney(playerid, money);
native GetPlayerFacingAnglef(playerid);
native GetPlayerWeaponName(playerid);
native GetVehicleHealthf(vehicleid);
native GetVehicleZAnglef(vehicleid);
native FreezePlayer(playerid, time);
native IsVehicleOccupied(vehicleid);
native ClearPlayerScreen(playerid);
native GetPlayerArmourf(playerid);
native GetPlayerHealthf(playerid);
native IsPlayerSwimming(playerid);
native IsVehicleLocked(vehicleid);
native GetVehicleName(vehicleid);
native UnlockVehicle(vehicleid);
native GetWeaponNamef(weaponid);
native GetPlayerNamef(playerid);
native IsPlayerDriver(playerid);
native GetPlayerIpf(playerid);
native LockVehicle(vehicleid);
native FlipVehicle(vehicleid);
Function Name | Description |
GetPlayerNamef | Returns the name of a player. |
GetPlayerArmourf | Returns the armour of a player . |
GetPlayerHealthf | Returns the health of a player . |
GetPlayerFacingAnglef | Returns the facing angle of a player . |
GetPlayerDistanceFromPlayer | Returns the distance of a player from another player . |
GetPlayerIpf | Returns the player’s IP. |
GetPlayerWeaponName | Returns the player’s weapon name. |
ClearPlayerScreen | Clear the player’s screen. |
SetPlayerMoney | Sets the player’s money. |
SetPlayerPosEx | Sets the player’s position and facing angle. |
GivePlayerWantedLevel | Gives wanted level to player. |
FreezePlayer | Freezes a player for a period. |
RemovePlayerWeapon | Remove an especific player’s weapon. |
IsVehicleOccupied | Return if a vehicle is occupied. |
LockVehicle | Locks a vehicle. |
UnlockVehicle | Unlocks a vehicle. |
GetVehicleName | Returns the vehicle’s name from modelid. |
GetVehicleZAnglef | Returns the vehicle Z angle . |
GetVehicleHealthf | Returns the health of a vehicle . |
GetVehicleEngineStatus | Checks vehicle’s engine status. |
IsVehicleLocked | Checks if a vehicle is locked. |
GetWeaponNamef | Return the name of a weapon. |
SendAdminMessage | Sends a message to rcon admins. |
IsPlayerInRangeOfVehicle | Returns the if a player is in range of a vehicle. |
GetPlayerDistanceFromVehicle | Returns the distance of a player from a vehicle . |
IsPlayerDriver | Checks if a player is a driver. |
SetVehicleInterior | Macro of LinkVehicleToInterior. |
FlipVehicle | Flips a vehicle. |
IsPlayerSwimming | Checks if a player is swimming (by anim). |
TeleportPlayerToPlayer | Teleports a player to another player. |
TeleportPlayerToVehicle | Teleports a player to a vehicle. |
Quote:
new message[32]; format(message, sizeof(message), "Hello, %s.", GetPlayerNamef(playerid)); SendClientMessage(playerid, DEFINED_COLOR, message); |
SuperViper - Show me how to return a Float in a function.
Download:
Pastebin link.
Dropbox link.