06.10.2011, 11:48
(
Последний раз редактировалось Pablo Borsellino; 18.10.2011 в 18:19.
)
Peace,
today I've decided, to publish my fourth Open Source Project. I sincerely apologize for my imperfect English. This Include provides over 30 new functions in your Gamemode/Filterscript. I would look forward to requests / ideas. This Include is only for Sa:Mp Version 0.3d RC1 or higher, because it use the RemoveBuildingForPlayerFunction.
Function's:
Public's:
How to use it:
1.) Put the File in your Server directory ..\pawno\includes\..
2.) Put the following Line in your Script under #include a_samp:
and recompile it.
Downloads:
http://solidfiles.com/d/c57ba/ (Includes Readme & Picture - Recommended)
http://pastebin.com/VeH43hVu
Changelog:
Rules:
Nother Mirrors: allowed
Editing Script: allowed
Removing Credits: allowed
Publish it: forbidden (Only on request)
Sell it: forbidden
Greetz!
today I've decided, to publish my fourth Open Source Project. I sincerely apologize for my imperfect English. This Include provides over 30 new functions in your Gamemode/Filterscript. I would look forward to requests / ideas. This Include is only for Sa:Mp Version 0.3d RC1 or higher, because it use the RemoveBuildingForPlayerFunction.
Function's:
pawn Код:
| GetWeaponDamage(WeaponID)
| • return: Damage from Weaponid in Healthpoints
| • wrong Syntax: return Error Message
| • example: printf("Weapon Damage from Weapon 31 is %d HP per Bullet",GetWeaponDamage(31));
pawn Код:
| IsKeyDown(Player,const Key)
| • return: true
| • wrong Syntax: return Error Message
| • example: printf("Player Holds fire: %b",IsKeyDown(playerid,KEY_FIRE));
pawn Код:
| FreezeVehicle(vehid,time)
| • return: true
| • wrong Syntax: return Error Message
| • example: FreezeVehicle(GetPlayerVehicleID(playerid),5000)
pawn Код:
| SetVehicleParams(VehicleID,Engine,Light,Alarm,Locked,Boonet,Boot,Objective)
| • return: true
| • wrong Syntax: -impossible-
| • example: SetVehicleParams(GetPlayerVehicleID(playerid),-1,-1,-1,-1,1,1,-1)
pawn Код:
| AddAction(const Name[MAX_ACTION_NAME],playerid=INVALID_ACTION_ID)
| • return: true
| • wrong Syntax: -impossible-
| • example: AddAction("Peace",INVALID_ACTION_ID)
pawn Код:
| RemAction(const Name[MAX_ACTION_NAME],playerid=INVALID_ACTION_ID)
| • return: true
| • wrong Syntax: -impossible-
| • example: RemAction("Peace",INVALID_ACTION_ID)
pawn Код:
| AddActionTime(time,const Name[MAX_ACTION_NAME],playerid=INVALID_ACTION_ID)
| • return: true
| • wrong Syntax: false
| • example: AddActionTime(10,"Peace",INVALID_ACTION_ID)
pawn Код:
| RemActionTime(time,const Name[MAX_ACTION_NAME],playerid = INVALID_ACTION_ID)
| • return: true
| • wrong Syntax: false
| • example: RemActionTime(5,"Peace",INVALID_ACTION_ID)
pawn Код:
| GetSecondsBetweenAction(const Name[MAX_ACTION_NAME],playerid = INVALID_ACTION_ID)
| • return: Player: playerid, Seconds / Server: Seconds
| • wrong Syntax: false
| • example: printf("Action \"Peace\" is %d Seconds ago",GetSecondsBetweenAction("Peace",INVALID_ACTION_ID));
pawn Код:
| IfActionExist(const Name[MAX_ACTION_NAME],playerid=INVALID_ACTION_ID)
| • return: true
| • wrong Syntax: false
| • example: printf("Action \"Peace\" exist: %d",IfActionExist("Peace",INVALID_ACTION_ID));
pawn Код:
| GetActionID(const Name[MAX_ACTION_NAME],playerid=INVALID_ACTION_ID)
| • return: Action ID
| • wrong Syntax:INVALID_ACTION_ID
| • example: printf("Action \"Peace's\" ID ist : %d",GetActionID("Peace",INVALID_ACTION_ID));
pawn Код:
| GetFreeActionID()
| • return: Free Action ID
| • wrong Syntax: INVALID_ACTION_ID
| • example: printf("Next free Action ID is : %d",GetFreeActionID());
pawn Код:
| ToggleCheatForPlayer(playerid,Cheat[],bool:Allowed)
| • -UNFINISHED, dont use it!-
pawn Код:
| IsCheatAllowedForPlayer(playerid,Cheat[])
| • -UNFINISHED, dont use it!-
pawn Код:
| SendClientCommand(playerid,Command[])
| • return: true
| • wrong Syntax: -impossible-
| • example: SendClientCommand(playerid,"/help")
pawn Код:
| GetNextFreePlayerID()
| • return: free id/-1
| • wrong Syntax: -impossible-
| • example: printf("Next free Player ID is: %d",GetNextFreePlayerID());
pawn Код:
| SetServerPassword(password[])
| • return: true
| • wrong Syntax: -impossible-
| • example: SetServerPassword("Peace");
pawn Код:
| RemoveServerPassword()
| • return: true
| • wrong Syntax: -impossible-
| • example: RemoveServerPassword();
pawn Код:
| ScrollText(Text[])
| • return: scrolled text
| • wrong Syntax: -impossible-
| • example: ScrollText("Peace")
pawn Код:
| RemoveCranesForPlayer(playerid)
| • return: true
| • wrong Syntax: -impossible-
| • example: RemoveCranesForPlayer(playerid);
pawn Код:
| RemoveSodaMachinesForPlayer(playerid)
| • return: true
| • wrong Syntax: -impossible-
| • example: RemoveSodaMachinesForPlayer(playerid);
pawn Код:
| GetRandomNumber(...)
| • return: one random entered number
| • wrong Syntax: -unknown-
| • example: RemoveSodaMachinesForPlayer(playerid);
pawn Код:
| GetRandomColor()
| • return: Colorcode like
| • wrong Syntax: -unknown-
| • example: SetPlayerColor(playerid,GetRandomColor());
pawn Код:
| IsValidVehicle(VehicleID)
| • return: true/false
| • wrong Syntax: false
| • example: printf("Vehicle ID 123 exist %d on the Server!",IsValidVehicle(123));
pawn Код:
| ReverseText(const Text[])
| • return: reversed text
| • wrong Syntax: -impossible-
| • example: printf("Reversed text: %s", ReverseText("!dlroW ecaeP));
pawn Код:
| GetRandomCode(Cells)
| • return: Random Code
| • wrong Syntax: return Error Message
| • example: printf("Random Code with 45 Cells: %s",GetRandomCode(45));
pawn Код:
| GetPlayerIPEx(playerid)
| • return: Player IP
| • wrong Syntax: -imposssible-
| • example: printf("IP from Player ID 4 is: %s",GetPlayerIPEx(4));
pawn Код:
| SendClientMessageEx(Color,Text[],...)
| • return: true
| • wrong Syntax: -imposssible-
| • example: SendClientMessageEx(-1,"This Message dont go to ID 4,8,25,123 and 499!",4,8,25,123,499)
pawn Код:
| GetVehicleDriver(VehicleID)
| • return: vehicle driver/-1
| • wrong Syntax: -imposssible-
| • example: printf("Driver of Vehicle ID 16 is Player ID: %d",GetVehicleDriver(16));
pawn Код:
| IsValidNosVehicle(VehicleID)
| • return: true/false
| • wrong Syntax: -imposssible-
| • example: printf("Vehicle ID 12 is %d valid Nos Vehicle",IsValidNosVehicle(12));
pawn Код:
| Log(FileName[],FileType[],Text[])
| • return: true
| • wrong Syntax: return Error Message
| • example: Log("Peace","wrl","This text got logged in the \"Peace.wrl\" File in the Scriptfiles directory!")
pawn Код:
| KickEx(...)
| • return: true
| • wrong Syntax: -imposssible-
| • example: KickEx(4,8,25,123,499);
pawn Код:
| IsPlayerReloading(playerid)
| • return: true/false
| • wrong Syntax: -imposssible-
| • example: printf("Player ID 4 reloads %d",IsPlayerReloading(4));
pawn Код:
| IsValidSkin(SkinID)
| • return: true/false
| • wrong Syntax: -imposssible-
| • example: printf("Skin ID 123 is %d Valid Skin!",IsValidSkin(123));
pawn Код:
| GetVehicleMaxPassengers(VehicleID)
| • return: vehicle seats
| • wrong Syntax: -imposssible-
| • example: printf("Max Passengers of Vehicle ID 16 are %d!",GetVehicleMaxPassengers(16));
pawn Код:
| OnPlayerEnterCheat(playerid,Cheat[]);
| • -UNFINISHED, dont use it!-
1.) Put the File in your Server directory ..\pawno\includes\..
2.) Put the following Line in your Script under #include a_samp:
pawn Код:
#include pFunc
Downloads:
http://solidfiles.com/d/c57ba/ (Includes Readme & Picture - Recommended)
http://pastebin.com/VeH43hVu
Changelog:
pawn Код:
• 6.10.2011:
-» Initial release.
• 18.10.2011:
-» Improved ReverseText(..)
-» Improved IsValidVehicle(..)
-» Removes all #pragma unused
Nother Mirrors: allowed
Editing Script: allowed
Removing Credits: allowed
Publish it: forbidden (Only on request)
Sell it: forbidden
Greetz!