Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Include New Functions Samp - By ZKDarkOMG.
- /* CHANGE LOG
- v 1.0
- - Include create.
- v 1.1
- - Add 3 new functions.
- */
- // Include SAMP
- #include <a_samp>
- // Defines
- #define VERSION "1.1"
- // Stocks
- stock SetPlayerMoney(playerid, money)
- {
- GivePlayerMoney(playerid, GetPlayerMoney(playerid));
- GivePlayerMoney(playerid, money);
- return 1;
- }
- stock SetPlayerHealthandArmour(playerid, Float:health, Float:armour)
- {
- SetPlayerHealth(playerid, health);
- SetPlayerArmour(playerid, armour);
- return 1;
- }
- stock SetPlayerPosInteriorWorld(playerid, Float:x, Float:y, Float:z, interior, virtualworld)
- {
- SetPlayerPos(playerid, x, y, z);
- SetPlayerInterior(playerid, interior);
- SetPlayerVirtualWorld(playerid, virtualworld);
- return 1;
- }
- stock DesbugPlayer(playerid)
- {
- if(GetPlayerInterior == 0 && GetPlayerVirtualWorld == 0) return SendClientMessage(playerid, -1, "{ff0000}You are not bugged.");
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualworld(playerid, 0);
- return 1;
- }
- stock QuitPlayerHealth(playerid, Float:health)
- {
- new Float:health2;
- GetPlayerHealth(playerid, health2);
- SetPlayerHealth(playerid, health2-health);
- return 1;
- }
- stock QuitPlayerArmour(playerid, Float:armour)
- {
- new Float:armour2;
- GetPlayerArmour(playerid, armour2);
- SetPlayerArmour(playerid, armour2-armour);
- return 1;
- }
- stock QuitPlayerHealthandArmour(playerid, Float:health, Float:armour)
- {
- new Float:health2, Float:armour2;
- GetPlayerHealth(playerid, health2);
- SetPlayerHealth(playerid, health2-health);
- GetPlayerArmour(playerid, armour2);
- SetPlayerArmour(playerid, armour2-armour);
- return 1;
- }
- stock GivePlayerHealth(playerid, Flot:health)
- {
- new Float:health2;
- GetPlayerHealth(playerid, health2);
- SetPlayerHealth(playerid, health2+health);
- return 1;
- }
- stock GivePlayerArmour(playerid, Flot:armour)
- {
- new Float:armour2;
- GetPlayerArmour(playerid, armour2);
- SetPlayerArmour(playerid, armour2+armour);
- return 1;
- }
- stock GivePlayerHealthandArmour(playerid, Float:health, Float:armour)
- {
- new Float:health2, Float:armour2;
- GetPlayerHealth(playerid, health2);
- SetPlayerHealth(playerid, health2+health);
- GetPlayerArmour(playerid, armour2);
- SetPlayerArmour(playerid, armour2+armour);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment