03.02.2012, 17:38
(
Последний раз редактировалось Michael@Belgium; 14.12.2012 в 16:25.
Причина: Updated to 1.0e
)
Current version: 1.0e
In Development: -
Код:
-
Ok, this is my first include which is using a lot of useful stocks/functions. I've worked 2 days on this include, so plz, don't blame or something. It has some awesome callbacks also !
Features:
- y_hooks
- Anti-Pause
- ... other functions (+/- 100 functions)
pawn Код:
native UnfreezePlayer(playerid);
native FreezePlayer(playerid);
native RemoveCranesForPlayer(playerid);
native RemoveSodaMachinesForPlayer(playerid);
native SetServerPassword(const password[]);
native strset(string[], input[]);
native SetPlayerPosEx(playerid, Float:x, Float:y, Float:z, Float:a);
native IsInvalidSkin(skinid);
native ShowMarkers( playerid, toggle );
native IsValidNosVehicle(vehicleid);
native GetXYInFrontOfPlayer(playerid, &Float:x2, &Float:y2, Float:distance);
native SendClientMessageToRconAdmin(msg[]);
native bool:IsValidNumber( const string[ ] );
native IsPlayerVehicleModded(playerid, vehicleid);
native DefaultGravity();
native GetSecondsBetweenAction(action);
native IsCharLower(c);
native IsCharUpper(c);
native IsPlayerOnFoot(playerid);
native IsPlayerOnAnyBike(playerid);
native IsPlayerOnAnyBoat(playerid);
native IsPlayerInAnyHelicopter(playerid);
native IsPlayerInAnyPlane(playerid);
native DeletePlayerWeapon(playerid, weaponid);
native KelvinToCelsius(value);
native CelsiusToKelvin(value);
native FahrenheitToCelsius(value);
native CelsiusToFahrenheit(value);
native ClearChatForAll();
native ClearChat(playerid);
native TeleportPlayerToPlayer(playerid1,playerid2);
native IsABicycle(carid);
native GetName(i);
native IsPlayerInZone(playerid, Float:minX, Float:minY, Float:maxX, Float:maxY);
native IsPlayerInWater(playerid);
native IsPlayerSpawned(playerid);
native UnJailPlayer(playerid);
native JailPlayer(playerid);
native GetClosestVehicleFromPoint(Float:x,Float:y);
native PutPlayerInNearestVehicle(playerid, seatid);
native StopVehicle(vehicleid);
native GetVehicleType(vehicleid);
native AlarmStop(vehicleid);
native FlipVehicle(vehicleid);
native ExplodeVehicle(vehicleid);
native ToggleVehicleObjective(vehicleid, estate);
native ToggleVehicleEngine(vehicleid, estate);
native ToggleVehicleEngine(vehicleid, estate);
native IsPlayerPaused(playerid);
native ToggleVehicleLight(vehicleid, estate);
native ToggleVehicleTrunk(vehicleid, estate);
native GetDeathReason(killerid, reason);
native GetDisconnectReason(reason);
native FreezeVehicleEx(vehid,Float:X,Float:Y,Float:Z,Float:A);
native FreezeVehicle(vehid,time);
native GivePlayerVehicle(playerid, vehicleid);
native SaveInFile(filename[],text[]);
native GetVehicleSpeed(vehicleid);
native GetPlayerSpeed(playerid);
native IsSomeoneInVehicle(vehicleid);
native IsVehicleUpsideDown(vehicleid);
native LockVehicle(vehicleid);
native UnlockVehicle(vehicleid);
native ToggleVehicleBonnet(vehicleid, estate);
native SetVehicleToAlarm(vehicleid,time);
native IsVehicleAlarmOn(vehicleid);
native ToggleVehicleAlarm(vehicleid,toggle);
native AreVehicleLightsOn(vehicleid);
native ToggleVehicleLights(vehicleid,toggle);
native SetVehicleNumberPlateEx(vehicleid,numberplate[]);
native GetWeaponNameById(weaponid);
native GetVehicleNameByModelId(vehiclemodel);
native GetWeaponIdByName(weaponname[]);
native GetVehicleModelIdByName(vehiclename[]);
native Crash(playerid);
native ReturnPlayerIDFromIP(ip[]);
native KickAllPlayers();
native KickNPCs();
native CountTotalPlayers();
native CountTotalRCONAdmins();
native CountTotalNPC();
native Float:GetVehicleAngle(vehicleid);
native Float:GetVehicleHealthEx(vehicleid);
native Float:GetPlayerAngle(playerid);
native Float:GetPlayerArmourEx(playerid);
native Float:GetPlayerHealthEx(playerid);
native GetPlayerIpEx(playerid);
native ShowMessageDialog(playerid, caption[], info[]);
pawn Код:
public OnPlayerUnPause(playerid)
public OnPlayerPause(playerid)
public OnPlayerVehicleHealthChange(playerid, vehicleid, Float:newhealth, Float:oldhealth)
pawn Код:
//example
public OnPlayerPause(playerid)
{
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s pressed esc.",name);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
public OnPlayerUnPause(playerid)
{
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s unpaused.",name);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
public OnPlayerVehicleHealthChange(playerid, vehicleid, Float:newhealth, Float:oldhealth)
{
new pName[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
if(newhealth > oldhealth)
{
format(string,sizeof(string),"[AC | WARNING] - Possible vehiclehealth hack detected for %s (%d)",pName,playerid);
SendClientMessageToAll(COLOR_PURPLE,string);
}
return 1;
}
Код:
V1.0e: - Deleted some stocks that weren't allowed to release it. V1.0d: - Added OnPlayerVehicleHealthChange(playerid, vehicleid, Float:newhealth, Float:oldhealth) - Fixed error 004: function "OnPlayerPause" is not implemented - Fixed error 004: function "OnPlayerUnPause" is not implemented V1.0c: - Added IsPlayerSpawned(playerid) - Added IsSomeoneInVehicle(vehicleid) - Added IsVehicleUpsideDown(vehicleid) V1.0b: - Edited Clear(All)Chat(playerid) - Edited CountTotalPlayers() - Added ShowMessageDialog(playerid, caption[], info[]) V1.0a: - Deletd ToLower©, ToUpper© - Edited Crash(playerid) - The callbackz OnPlayer(Un)Pause(playerid) MUST be in your gamemode ! (My bad, i did it in the include) V1.0: First Release
- Download [MV]_Functions at the bottom
- ... then just use #include <[MV]_Functions> if you want to use one of the functions in the include
pawn Код:
/*
___ __ ____ _____ ______ _ _
| _| \/ \ \ / /_ | | ____| | | (_)
| | | \ / |\ \ / / | | | |__ _ _ _ __ ___| |_ _ ___ _ __ ___
| | | |\/| | \ \/ / | | | __| | | | '_ \ / __| __| |/ _ \| '_ \/ __|
| | | | | | \ / | | | | | |_| | | | | (__| |_| | (_) | | | \__ \
| |_|_| |_| \/ _| | |_| \__,_|_| |_|\___|\__|_|\___/|_| |_|___/
|___| |___|______
|______|
Free to use on the following conditions:
*Do not re-release edited versions without my permision
*Do not and NEVER clame this as your own, not even an edit!
*Say thanks on the sa-mp forums if you like ;)
----------------CREDITS:--------------------------------------------------------
- DeletePlayerWeapon(playerid, weaponid) //by RyDeR`
- GetSecondsBetweenAction(action) // By [03]Garsino
- Wesley !!! For +/- 5 stocks
- System64, Fixing dumb mistaces.
*/
... are always welcome !
Download:
Pastebin 1.0d
Attached: