SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 16/02/2015, 12:15 AM   #1
Slice
High-roller
 
Join Date: Mar 2008
Location: Sweden
Posts: 1,896
Reputation: 1590
Spray SKY - Slice's fork of kurta999's fork of YSF

This plugin provides low-level functions to let Pawn scripts do powerful things.

This plugin in itself does not aim to provide full features, it's meant to let scripters make cool, new things.

It was made along with this include: weapon-config.inc

pawn Code:
#if defined _INC_SKY
    #endinput
#endif
#define _INC_SKY

// Make a player appear to spawn for all players but himself
native SpawnPlayerForWorld(playerid);
// Keep re-sending the last received sync data
native FreezeSyncData(playerid, bool:toggle);
// Set the HP bar (warning: affects GetPlayerHealth)
native SetFakeHealth(playerid, health);
// Set the armour bar (warning: affects GetPlayerArmour)
native SetFakeArmour(playerid, armour);
// Force a specific facing angle to sync for other players
native SetFakeFacingAngle(playerid, Float:angle = Float:0x7FFFFFFF);
// Disable stealth-knife sync (only the player doing it will see it happen)
native SetKnifeSync(toggle);
// Make a player appear dead for other players
native SendDeath(playerid);
// Set the last animation data
native SetLastAnimationData(playerid, data);
// Send the last sync data
// If an animation is specified, it will be similar to ApplyAnimation
native SendLastSyncData(playerid, toplayerid, animation = 0);
// Clear animations for another player only
native ClearAnimationsForPlayer(playerid, forplayerid);
// Disable infinity ammo bugs and other bugs (some bugs still work)
native SetDisableSyncBugs(toggle);
// Make the weapon state always synced as WEAPONSTATE_MORE_BULLETS
native SetInfiniteAmmoSync(playerid, toggle);
// Stop syncing keys for a player
native SetKeySyncBlocked(playerid, toggle);
// Same as YSF (renamed to avoid problems)
native TextDrawSetPosition(Text:text, Float:x, Float:y);
// Same as YSF (renamed to avoid problems)
native PlayerTextDrawSetPosition(playerid, PlayerText:text, Float:x, Float:y);

GitHub: https://github.com/oscar-broman/SKY
Download: https://github.com/oscar-broman/SKY/releases

Some things you can do:
  • Customize healthbars
  • Respawn and clear animations for 1 player at a time
  • Disable syncing of stealth knife (for a custom implementation via OnPlayerGiveDamage)
  • Freeze a player's sync data so the last sent data keeps getting re-sent
  • Set infinite ammo sync. You could keep sending GivePlayerWeapon(playerid, SOME_WEAPON, 0) and using infinite ammo sync to make fast-shooting RPGs and snipers
  • Disable sync bugs (mostly for non-lagcomp), such as infinite bullet bugs and slide bugs
Slice is offline   Reply With Quote
Old 16/02/2015, 12:27 AM   #2
Kar
High-roller
 
Kar's Avatar
 
Join Date: May 2010
Location: Black Asylum
Posts: 3,184
Reputation: 506
Default Re: SKY - Slice's fork of kurta999's fork of YSF

Hell yea, so I can fix knife sync?

Gonna test this out.

Does this allow for 255 max health and make the health bar longer?
Kar is offline   Reply With Quote
Old 16/02/2015, 12:34 AM   #3
n0minal
High-roller
 
n0minal's Avatar
 
Join Date: Mar 2013
Location: Rio de Janeiro
Posts: 4,154
Reputation: 728
Default Re: SKY - Slice's fork of kurta999's fork of YSF

Very good Slice!
__________________
n0minal is offline   Reply With Quote
Old 16/02/2015, 12:43 AM   #4
SimonItaly
Huge Clucker
 
SimonItaly's Avatar
 
Join Date: Mar 2010
Location: Italy
Posts: 252
Reputation: 85
Default Re: SKY - Slice's fork of kurta999's fork of YSF

Since this is a YSF fork it still relies on SA:MP version memory addresses, right?
SimonItaly is offline   Reply With Quote
Old 16/02/2015, 01:17 AM   #5
Slice
High-roller
 
Join Date: Mar 2008
Location: Sweden
Posts: 1,896
Reputation: 1590
Default Re: SKY - Slice's fork of kurta999's fork of YSF

I tried to limit that as much as possible. There is only a few places that will need to be updated for new versions.

It's on GitHub though, and if I don't update it in time, someone else will.
Slice is offline   Reply With Quote
Old 16/02/2015, 01:34 AM   #6
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,491
Reputation: 439
Default Re: SKY - Slice's fork of kurta999's fork of YSF

Awesome! Slice is truly amazing, but why name it SKY? Just a weird question
Abagail is offline   Reply With Quote
Old 16/02/2015, 01:36 AM   #7
n0minal
High-roller
 
n0minal's Avatar
 
Join Date: Mar 2013
Location: Rio de Janeiro
Posts: 4,154
Reputation: 728
Default Re: SKY - Slice's fork of kurta999's fork of YSF

S = Slice's K= Kurta999's Y = YSF, isnt obvious?
__________________
n0minal is offline   Reply With Quote
Old 16/02/2015, 01:44 AM   #8
Spetz
Little Clucker
 
Spetz's Avatar
 
Join Date: Feb 2015
Location: Chile
Posts: 4
Reputation: 3
Default Re: SKY - Slice's fork of kurta999's fork of YSF

This is pretty nice Slice i'll take a look on this
Spetz is offline   Reply With Quote
Old 17/03/2015, 12:06 AM   #9
kurta999
High-roller
 
kurta999's Avatar
 
Join Date: Apr 2009
Location: Slovakia (HU)
Posts: 1,421
Reputation: 626
Default Re: SKY - Slice's fork of kurta999's fork of YSF

I hope this works with YSF because I added an advertisement under Download section at YSF first page.
__________________
I don't play and have ANY interest in SA:MP anymore! Please do not ask for help, because I'm not going to reply.
kurta999 is offline   Reply With Quote
Old 17/03/2015, 12:45 AM   #10
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,697
Reputation: 127
Default Re: SKY - Slice's fork of kurta999's fork of YSF

Quote:
Originally Posted by Kar View Post
Hell yea, so I can fix knife sync?

Gonna test this out.

Does this allow for 255 max health and make the health bar longer?
^ That .Same questions from me
BeckzyBoi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] YSF - kurta999's version kurta999 Plugin Development 1776 05/11/2018 10:00 PM
Forklift fork Eloctro Scripting Help 3 06/07/2014 09:38 PM
Mailer from Slice Moras Server Support 0 09/01/2012 08:39 PM


All times are GMT. The time now is 02:06 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.