0.3e Suggestions

pawn Код:
GetPlayerDistanceFromPoint2D

Edit for the dude below, I meant for the speed.. because Kalcor added GetPlayerDistanceFromPoint (3D) in 0.3c revisions
Reply

Quote:
Originally Posted by Kar
Посмотреть сообщение
pawn Код:
GetPlayerDistanceFromPoint2D
pawn Код:
#define INF_INT 0x7F800000
const Float:INF_FLOAT=Float:0x7F800000;

stock Float:GetPlayerDistanceToPointXY(playerid,Float:xs,Float:ys)
{
    return GetDistanceToPointXY(playerid,xs,ys);
}

stock Float:GetDistanceToPointXY(playerid,Float:xs,Float:ys)
{
    new Float:x1,Float:y1,Float:z1;
    GetPlayerPos(playerid,x1,y1,z1);
    return GetDistanceToPoint(playerid,xs,ys,z1);
}

stock Float:GetDistanceBetweenPoints(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2)
{
    return floatadd(floatadd(floatsqroot(floatpower(floatsub(x1,x2),2)),floatsqroot(floatpower(floatsub(y1,y2),2))),floatsqroot(floatpower(floatsub(z1,z2),2)));
}

stock Float:GetDistanceToPoint(playerid,Float:x1,Float:y1,Float:z1)
{
    if (IsPlayerConnected(playerid))
    {
        new Float:x2,Float:y2,Float:z2;
        GetPlayerPos(playerid,x2,y2,z2);
        return GetDistanceBetweenPoints(x1,y1,z1,x2,y2,z2);
    }
    return INF_FLOAT;
}
Reply

Quote:
Originally Posted by kizla
Посмотреть сообщение
pawn Код:
#define INF_INT 0x7F800000
const Float:INF_FLOAT=Float:0x7F800000;

stock Float:GetPlayerDistanceToPointXY(playerid,Float:xs,Float:ys)
{
    return GetDistanceToPointXY(playerid,xs,ys);
}

stock Float:GetDistanceToPointXY(playerid,Float:xs,Float:ys)
{
    new Float:x1,Float:y1,Float:z1;
    GetPlayerPos(playerid,x1,y1,z1);
    return GetDistanceToPoint(playerid,xs,ys,z1);
}

stock Float:GetDistanceBetweenPoints(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2)
{
    return floatadd(floatadd(floatsqroot(floatpower(floatsub(x1,x2),2)),floatsqroot(floatpower(floatsub(y1,y2),2))),floatsqroot(floatpower(floatsub(z1,z2),2)));
}

stock Float:GetDistanceToPoint(playerid,Float:x1,Float:y1,Float:z1)
{
    if (IsPlayerConnected(playerid))
    {
        new Float:x2,Float:y2,Float:z2;
        GetPlayerPos(playerid,x2,y2,z2);
        return GetDistanceBetweenPoints(x1,y1,z1,x2,y2,z2);
    }
    return INF_FLOAT;
}
The distance between two 2-dimensional points is simply:
Код:
floatsqroot(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)))
The 'z' isn't needed at all.
Reply

I think it would be good to use functions like SetObjectMaterial and SetObjectMaterialText to SetPlayerAttachedObject, so we could create some more funny things like a vest for SWAT or a helmet or something written in another color.
Reply

I think EditAttachedObject should have some control

Possibly

pawn Код:
EditAttachedObject(playerid, index, bool:EditScale = true);
Well.. for this because we can't detect when a player is editing the scale of a object, and some people may not want the scale to be edited. The only workaround is to save the scale before editing then set it back after editing.
Reply

TogglePlayerControllableKey(playerid, key, toggle)
Reply

Please ! All Functions which provides to destroy something set variables parameter to -1 or so automatically `Pass by reference`
Exampe:Text draw IDs sa-mp server developers almost always stores under variable therefore in TextDrawDestroy reset provided variable to INVALID_TEXT_DRAW. It takes lot of memory doing it by our selves if lots of text draws are used... The same for 3D texts etc....
Reply

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
Yeah I was wondering this, how about just removing the SetPlayerAttachedObject and putting the bone parameter and other stuff on to AttachObjectToPlayer! Wouldn't that be a lot easier than having two functions that pretty much do the same things?
We don't have AttachPlayerObjectToPlayer, which is the main problem for this idea. Also, a additional parameter to enable/disable collisions is needed if SetPlayerAttachedObject is moved to AttachObjectToPlayer.
Reply

Add attach to vehicle part (door, boot, bonnet)
Reply

Please, you can tell how useful this might be:
pawn Код:
native OnPlayerUseSlotMachine( playerid, reward );
Reply

(ShowPlayerDialog to Response 0 if new dialog is showed)

Example: i have a dialog 1 on player login and i have dialog2 on OnPlayerClickPlayer so the problem is when i am on login and dialog 1 is showed i press TAB and click on player it show me dialog2 and i skip Login dialog...

ITS GOOD TO MAKE WHEN Dialog 1 IS SHOWED AND I OPEN Dialog 2 THEN DIALOG 1 TO RESPONSE 0!

i now that this can be done with some variables.....but i think its good to make...
SRY BAD ENGLISH!
Reply

Quote:
Originally Posted by dud
Посмотреть сообщение
(ShowPlayerDialog to Response 0 if new dialog is showed)

Example: i have a dialog 1 on player login and i have dialog2 on OnPlayerClickPlayer so the problem is when i am on login and dialog 1 is showed i press TAB and click on player it show me dialog2 and i skip Login dialog...

ITS GOOD TO MAKE WHEN Dialog 1 IS SHOWED AND I OPEN Dialog 2 THEN DIALOG 1 TO RESPONSE 0!

i now that this can be done with some variables.....but i think its good to make...
SRY BAD ENGLISH!
Check if the player is logged in in the OnPlayerClickPlayer and only show the dialog if the player is logged in.
Reply

Quote:
Originally Posted by Basssiiie
Посмотреть сообщение
Check if the player is logged in in the OnPlayerClickPlayer and only show the dialog if the player is logged in.
i now that , it's ok but i think its better to make to response 0...
Reply

Quote:
Originally Posted by dud
Посмотреть сообщение
(ShowPlayerDialog to Response 0 if new dialog is showed)

Example: i have a dialog 1 on player login and i have dialog2 on OnPlayerClickPlayer so the problem is when i am on login and dialog 1 is showed i press TAB and click on player it show me dialog2 and i skip Login dialog...

ITS GOOD TO MAKE WHEN Dialog 1 IS SHOWED AND I OPEN Dialog 2 THEN DIALOG 1 TO RESPONSE 0!

i now that this can be done with some variables.....but i think its good to make...
SRY BAD ENGLISH!
See 'dbuffer' in my signature.
Reply

pawn Код:
GetObjectModel(objectid);
Reply

Native support for the most used plugins (MySQL, Object Streamer and Co.)

What I mean: Use them without the need of a plugin (Directly supported by SA-MP).
Reply

Quote:
Originally Posted by Programie
Посмотреть сообщение
Native support for the most used plugins (MySQL, Object Streamer and Co.)

What I mean: Use them without the need of a plugin (Directly supported by SA-MP).
yea, the betatester stuff could come with default sa-mp
Reply

Quote:
Originally Posted by Programie
Посмотреть сообщение
Native support for the most used plugins (MySQL, Object Streamer and Co.)

What I mean: Use them without the need of a plugin (Directly supported by SA-MP).
What if they need to be updated? It would be better off with a .dll/.so file that can be updated without having to wait for a new SA:MP version.
Reply

Quote:
Originally Posted by OKStyle
Посмотреть сообщение
Spectacor may be?
No, i mean:

Quote:
Originally Posted by AirKite
Посмотреть сообщение
TogglePlayerControllableKey(playerid, key, toggle)
It's will be very useful. Can makes, hydra or tank (no fire). Anti-DM zones etc...
Reply

Edit GTA San Andreas engine so gametexts and textdraws supports UTF8 characters and others.
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)