SA-MP Forums Archive
0.3e Suggestions - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 0.3e Suggestions (/showthread.php?tid=323377)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13


Re: 0.3e Suggestions - Kar - 22.04.2012

pawn Код:
GetPlayerDistanceFromPoint2D

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


Re: 0.3e Suggestions - kizla - 22.04.2012

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;
}



Re: 0.3e Suggestions - Tannz0rz - 22.04.2012

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.


Re: 0.3e Suggestions - DartakousLien - 22.04.2012

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.



Re: 0.3e Suggestions - Kar - 22.04.2012

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.


Re: 0.3e Suggestions - AirKite - 22.04.2012

TogglePlayerControllableKey(playerid, key, toggle)


Re: 0.3e Suggestions - Hanger - 23.04.2012

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....


Re: 0.3e Suggestions - leong124 - 23.04.2012

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.


Re: 0.3e Suggestions - azen - 23.04.2012

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


Respuesta: 0.3e Suggestions - admantis - 23.04.2012

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



Re: 0.3e Suggestions - dud - 23.04.2012

(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!


Re: 0.3e Suggestions - Basssiiie - 23.04.2012

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.


Re: 0.3e Suggestions - dud - 23.04.2012

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...


Re: 0.3e Suggestions - MP2 - 23.04.2012

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.


Re: 0.3e Suggestions - [MG]Dimi - 23.04.2012

pawn Код:
GetObjectModel(objectid);



Re: 0.3e Suggestions - Programie - 23.04.2012

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).


AW: Re: 0.3e Suggestions - Meta - 25.04.2012

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


Re: 0.3e Suggestions - Garsino - 25.04.2012

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.


Re: 0.3e Suggestions - AirKite - 25.04.2012

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...


Re: 0.3e Suggestions - Hanger - 25.04.2012

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