[Include] se_samp.inc | Swyft's and Emmet's Functions | V2
#1


Hey guys, Swyft here. Displaying my new include that's basically a new version of the <a_samp> include. Now before I get started there
are lots of people I need to thank here.

Credits
- Emmet (His Kick/Ban Timing include, and helping with my RangeBan, ecmd, Per-Player Pickup)
- Swyft - The include

New Functions
pawn Код:
GetPlayerInfractions(playerid); // This will get the players Infractions.
CreatePlayerPickup(playerid, model, type, Float:x, Float:y, Float:z);
DestroyPlayerPickup(playerid, pickupid);
GetPlayerPickupPos(playerid, pickupid, &Float:x, &Float:y, &Float:z);
GetPlayerPickupModel(playerid, pickupid);
IsValidPlayerPickup(playerid, pickupid);
Callbacks
pawn Код:
OnCharacterUpdate(playerid) // A more improved version of OnPlayerUpdate, uses less CPU
OnServerUpdate(playerid) // Not much use towards it yet, but could be used for security reasons.
OnPlayerPickUp(playerid, pickupid) // Per-Player Pickups, very useful!
OnPlayerEnterSeat(playerid, vehicleid, seatid) // When someone enters the vehicle a message displays... Not the same as OnPlayerEnterVehicle
More improved stuff :P
pawn Код:
// Kick(playerid), Ban(playerid) and BanEx(playerid) are fixed, it caused some delay issues.. We are also going to introduce a NEW one for you all :)
RBanEx(playerid, "Ban String here"); // This will range ban a player (tested, thanks to Emmet)
// AntiDeAMX, No need to put AntiDeAMX(); under any of your callbacks, it is already being called in our include :)
// Emmet's Command Processor [Faster then ZCMD]
Tutorial
Well, I just want to point out now, that when you put this #include in your script, you do not need #include <a_samp

pawn Код:
#include <s_samp>
// Your other includes here, no need for a_samp
Version: 1.0


SA-MP Default Filterscript, with the Swyft Functions included
Reply
#2

Very Nice Script. One Suggestion Though. You Should Add A CallBack Named OnPlayerShootWeapon. This Is A Good Include Though, Good Job.
Reply
#3

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Very Nice Script. One Suggestion Though. You Should Add A CallBack Named OnPlayerShootWeapon. This Is A Good Include Though, Good Job.
Will do
Reply
#4

Nice,i like your avatar
Reply
#5

Thanks
Reply
#6

Nice logo, although nice work with the efforts.
Reply
#7

pawn Код:
// Emmet's Command Processor [Faster then ZCMD]
Than*

Can you explain what does they check and/or when they're being called ? (the callbacks below)
pawn Код:
OnCharacterUpdate(playerid) // A more improved version of OnPlayerUpdate, uses less CPU
OnServerUpdate(playerid) // Not much use towards it yet, but could be used for security reasons.
Reply
#8

What's the difference between OnCharacterUpdate and OnServerUpdate, except for the fact that OnServerUpdate actually does something?

OnCharacterUpdate is never called, so yes, you could say uses less CPU.
Reply
#9

Quote:
Originally Posted by Excel™
Посмотреть сообщение
Nice logo, although nice work with the efforts.
Thanks!

Quote:
Originally Posted by xkirill
Посмотреть сообщение
pawn Код:
// Emmet's Command Processor [Faster then ZCMD]
Than*

Can you explain what does they check and/or when they're being called ? (the callbacks below)
pawn Код:
OnCharacterUpdate(playerid) // A more improved version of OnPlayerUpdate, uses less CPU
OnServerUpdate(playerid) // Not much use towards it yet, but could be used for security reasons.
OnCharacterUpdate and OnServerUpdate will call each second
Quote:
Originally Posted by Basssiiie
Посмотреть сообщение
What's the difference between OnCharacterUpdate and OnServerUpdate, except for the fact that OnServerUpdate actually does something?

OnCharacterUpdate is never called, so yes, you could say uses less CPU.
I fixed OnCharacterUpdate, the callback had a different name before. Sorry :P
Reply
#10

I would recommend taking out a lot of the IsPlayerConnected() checks makes no sense to me to do that it should be up to the user not the function to determine if a player is connected. If your code is done correctly you would never need to that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)