[Include] New SA-MP callbacks!

Quote:
Originally Posted by GwENiko
Посмотреть сообщение
Wow, how come after adding Emmet's include, i receive many, many indentation warnings? lol

pawn Код:
\pawno\include\callback.inc(183) : warning 217: loose indentation
\pawno\include\callback.inc(296) : warning 217: loose indentation
\pawno\include\callback.inc(297) : warning 217: loose indentation
\pawno\include\callback.inc(324) : warning 217: loose indentation
\pawno\include\callback.inc(364) : warning 217: loose indentation
\pawno\include\callback.inc(382) : warning 217: loose indentation
\pawno\include\callback.inc(389) : warning 217: loose indentation
\pawno\include\callback.inc(410) : warning 217: loose indentation
\pawno\include\callback.inc(411) : warning 217: loose indentation
\pawno\include\callback.inc(449) : warning 217: loose indentation
\pawno\include\callback.inc(456) : warning 217: loose indentation
\pawno\include\callback.inc(458) : warning 217: loose indentation
\pawno\include\callback.inc(463) : warning 217: loose indentation
\pawno\include\callback.inc(481) : warning 217: loose indentation
\pawno\include\callback.inc(492) : warning 217: loose indentation
\pawno\include\callback.inc(513) : warning 217: loose indentation
\pawno\include\callback.inc(518) : warning 217: loose indentation
\pawno\include\callback.inc(568) : warning 217: loose indentation
\pawno\include\callback.inc(605) : warning 217: loose indentation
\pawno\include\callback.inc(628) : warning 217: loose indentation
\pawno\include\callback.inc(631) : warning 217: loose indentation
\pawno\include\callback.inc(643) : warning 217: loose indentation
\pawno\include\callback.inc(657) : warning 217: loose indentation
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


23 Warnings.
Although without it, i dont receive any warnings at all
just use
Код:
#pragma tabsize 0
after ur <a_samp> incl.
Reply

Quote:
Originally Posted by Unknown1234
Посмотреть сообщение
just use
Код:
#pragma tabsize 0
after ur <a_samp> incl.
lmao nah.
Reply

I'm not getting those warnings, try downloading it from GitHub instead. Pastebin likes to fuck up indentation.
Reply

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
I'm not getting those warnings, try downloading it from GitHub instead. Pastebin likes to fuck up indentation.
Yea, thats why, i didnt even notice. But yea, its working good except OnPlayerAntiReload it causes players to desynchronize and show as AFK, happens to everyone, any idea how to fix it?
Reply

Quote:
Originally Posted by GwENiko
Посмотреть сообщение
Yea, thats why, i didnt even notice. But yea, its working good except OnPlayerAntiReload it causes players to desynchronize and show as AFK, happens to everyone, any idea how to fix it?
Fixed. Sorry about that lol. It was caused by an "array index out of bounds" error, since I didn't add enough slots to the array that holds the total shots.
Reply

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Fixed. Sorry about that lol. It was caused by an "array index out of bounds" error, since I didn't add enough slots to the array that holds the total shots.
oh thats relieving then :P. is the fixed version download-able yet?
Reply

Quote:
Originally Posted by GwENiko
Посмотреть сообщение
oh thats relieving then :P. is the fixed version download-able yet?
Yeah, feel free to download it.
Reply

Everything works as intended in my code now, hot release , thanks for the help aswell also repped you
Reply

The Disable cursor callback doesn't work.
I REPPED you though for your awesome work.Keep it up and fix the bug please.I really need that call back.
Код:
D:\Ultimate Gaming Server\filterscripts\sd.pwn(75) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply

Works fine for me. Try using this syntax:

pawn Код:
public OnPlayerDisableCursor(playerid, hovercolor)
{
    return 1;
}
Reply

OnPlayerStartBurning / IsPlayerBurning?
I've been thinking of a function capable of checking for these since ages, however i came up with nothing :]
Reply

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
OnPlayerStartBurning / IsPlayerBurning?
I've been thinking of a function capable of checking for these since ages, however i came up with nothing :]
Could maybe be detected by checking if the player is slowly loosing health, - and near fire particles?
Reply

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
OnPlayerStartBurning / IsPlayerBurning?
I've been thinking of a function capable of checking for these since ages, however i came up with nothing :]
Quote:
Originally Posted by Abagail
Посмотреть сообщение
Could maybe be detected by checking if the player is slowly loosing health, - and near fire particles?
Isn't the only way a player can burn is Explosion? and flamethrower?
they can both be detected
https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
If i'm wrong, Correct me? :S

& I don't know about Vehicle's explosions. If they burn you or they can be detected
Reply

"The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)"

I've actually never knew that! I've been using timers to detect this for a while.

I'll add this in the next update, which should be later on today or tomorrow. I'll also be adding a few useful callbacks.
Reply

Thanks Emmet for the help.Anyway your example.pwn mislead me.
It said to put color instead of hovercolor.
Reply

Great work there
Reply

Added three new callbacks:

pawn Код:
public OnPlayerBurning(playerid, status)
{
    if (status)
    {
        // Started burning
    }
    else
    {
        // Stopped burning
    }
    return 1;
}

public OnPlayerAiming(playerid, weaponid, status)
{
    if (status)
    {
        // Started aiming
    }
    else
    {
        // Stopped aiming
    }
    return 1;
}

public OnPlayerTakePicture(playerid);
{
    return 1;
}
And these functions:

pawn Код:
stock IsPlayerBurning(playerid);
stock IsPlayerAiming(playerid);
"OnPlayerTakePicture" is called when a player takes a picture with a camera. I was bored so I figured why not add it. It could be useful for roleplay servers too, lol.

Quote:
Originally Posted by SWGamer
Посмотреть сообщение
Thanks Emmet for the help.Anyway your example.pwn mislead me.
It said to put color instead of hovercolor.
Yeah, sorry bout that. I don't usually update "example.pwn" when I update this include.
Reply

can u add this callback (though i know its impossible )
pawn Код:
public OnPlayerGetStuntBonus(playerid, money)
Reply

It's a difficult challenge but all I have to do is check if stunt bonus is enabled and if the player is in a vehicle. If the player randomly earns money without the usage of GivePlayerMoney, then the function will be called.

I'm gonna try this
Reply

Nice, Shouldn't OnPlayerBurning be OnPlayerStartBurning?
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)