SA-MP Forums Archive
Suggestions Thread - 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: Suggestions Thread (/showthread.php?tid=405830)

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


Re: Suggestions Thread - mineralo - 14.01.2013

Quote:
Originally Posted by Diorturato
Посмотреть сообщение
I don't quite understand what is SetPlayerListenKeyFrequency?
I think he meant like spam but this could be scripts


Re: Suggestions Thread - zgintasz - 14.01.2013

Quote:
Originally Posted by mineralo
Посмотреть сообщение
I think he meant like spam but this could be scripts
You can see by function name, that SetPlayerListenKeyFrequency wouldn't somehow related with spam. I'm sure he meant something like SetPlayerKeyboardListenRate, I'm not sure how to explain it, with easy words it would be like how many characters can be wrote by just holding a key. I don't think it would be useful.


Diorturato - AirKite - 14.01.2013

Quote:
Originally Posted by Diorturato
Посмотреть сообщение
I don't quite understand what is SetPlayerListenKeyFrequency?
Anti-flood keys packages, on client-side.

Quote:
Originally Posted by mineralo
Посмотреть сообщение
I think he meant like spam but this could be scripts
Yes, but only server-side. SetPlayerListenKeyFrequency make safe traffic.

Quote:
Originally Posted by zgintasz
Посмотреть сообщение
You can see by function name, that SetPlayerListenKeyFrequency wouldn't somehow related with spam. I'm sure he meant something like SetPlayerKeyboardListenRate, I'm not sure how to explain it, with easy words it would be like how many characters can be wrote by just holding a key.
Yes, anti-flood (if players push fast "kjadhjkashdjkahsdjkh" or some).

Quote:
Originally Posted by zgintasz
Посмотреть сообщение
I don't think it would be useful.
Why not? I explained this:
pawn Код:
native SetPlayerListenKeyFrequency(playerid, counts, pertime) - Available Frequency (counts per time).
// Example: SetPlayerListenKeyFrequency(playerid, 10, 5000); 10 count of push in 5 seconds Available. (Other Client must NOT SENDING TO SERVER) - (and server must protect if client not follow this rule, disconnect (scriptable or in code samp-server)).

native SetPlayerListenKey(playerid, keycode, bool:toggle) - return true or false.
// Example: SetPlayerListenKey(playerid, KEY_CODE_ENTER, true);

native GetPlayerListenedKey(playerid, keycode) - return true or false
// Example: GetPlayerListenedKey(playerid, KEY_CODE_ENTER); Should return TRUE if key is down.

public OnListenedKeyResponse(playerid, keycode, updown);

///////////////////////////////////////////////////////////////////////////
// Example script:
public OnPlayerConnect(playerid) {
    SetPlayerListenKeyFrequency(playerid, 10, 5000);
    SetPlayerListenKey(playerid, KEY_CODE_ENTER, true);
    SetPlayerListenKey(playerid, KEY_CODE_F12, true);
}

public OnListenedKeyResponse(playerid, keycode, isdown) {
    if(keycode == KEY_CODE_ENTER && isdown) { // DOWN
        // Show dialog text "You Pushed ENTER"
    } else if(keycode == KEY_CODE_F12) {
        if(isdown) { // DOWN
            // SHOW TEXTDRAW (CLOCK - TIME)
            // Send Chat, like: /me looked watch
            // Aply animation (see on clock (hand))
        } else { // UP
            // HIDE TEXTDRAW (CLOCK - TIME)
            // CLEAR animation (see on clock (hand))
        }
    }  
}
///////////////////////////////////////////////////////////////////////////



Re: Suggestions Thread - Admigo - 14.01.2013

Is it possible to place the materialtext on the floor?


Re: Suggestions Thread - Mathers - 14.01.2013

pawn Код:
DisableWeatherEffectsInArea(Float:Xmin, Float:Ymin, Float:Xmax, Float:Ymax); //Rain, Sand Storm, Clouds, maybe birds?
SetLightLevelInArea(Float:Xmin, Float:Ymin, Float:Xmax, Float:Ymax, Amount); //If Amount is in -, area will be darker, if it's in + area will be brighter...
//Both functions are good for custom interiors etc...
pawn Код:
AddWaterToArea(Float:Xmin, Float:Ymin, Float:Xmax, Float:Ymax, Amount); //Good for swimming pools etc...
pawn Код:
server.cfg
DisableRconLog 0/1 // Disable Logging for unsuccess remote rcon login (if rcon is on 1).
BanIPOnBadRconLogin 0-? // BanIP from remote login after specified amount of logins...
pawn Код:
//Increase the limit of MAX_VEHICLES, 2000 is not enough for whole San Andreas...
pawn Код:
SetObjectSolid(objectid, bool:solid); //true to make object solid if it's not, and false to make object unsolid if it's solid...
MakeObjectDamageable(objectid, Float:health);



Re: Suggestions Thread - SuperViper - 15.01.2013

Код:
TogglePlayerControllable(playerid, bool: controllable, bool: lockCamera = true);
Also, now that we can do the model preview with textdraws, the textdraw limit should be increased because I can think of SEVERAL uses of the preview feature for large menus, which will take up a large sum of textdraws.


Re: Suggestions Thread - davve95 - 15.01.2013

1. Changable engine in vehicles like: a Infernus motor in a Bullet etc...


2. SetObjectMatrial on vehicle parts..


3.


Re: Suggestions Thread - Travis The Tiger - 15.01.2013

Quote:
Originally Posted by davve95
Посмотреть сообщение
1. Changable engine in vehicles like: a Infernus motor in a Bullet etc...


2. SetObjectMatrial on vehicle parts..


3.
I don't think you would be able to set the engines because the engines are apart of the car model. As for SetObjectMaterial on vehicle parts, you could just create the objects with SetObjectMaterial and then attach them to the vehicle.


Re: Suggestions Thread - RajatPawar - 15.01.2013

Quote:
Originally Posted by davve95
Посмотреть сообщение
1. Changable engine in vehicles like: a Infernus motor in a Bullet etc...
Not possible, is 'in-built'.


Re: Suggestions Thread - anybox - 15.01.2013

ToggleClassSelectionForPlayer(playerid, toggle);
if toggle is zero player can't use F4 key to switch class.


Re: Suggestions Thread - AirKite - 15.01.2013

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
Код:
TogglePlayerControllable(playerid, bool: controllable, bool: lockCamera = true);
Also, now that we can do the model preview with textdraws, the textdraw limit should be increased because I can think of SEVERAL uses of the preview feature for large menus, which will take up a large sum of textdraws.
TogglePlayerControllableKey(playerid, controlkey, bool:toggle)
pawn Код:
// Example: new TogglePlayerControllableEx (without mouse blocking)
stock TogglePlayerControllableEx(playerid, bool:toggle) {
    TogglePlayerControllableKey(playerid, KEY_UP,               toggle);
    TogglePlayerControllableKey(playerid, KEY_DOWN,             toggle);
    TogglePlayerControllableKey(playerid, KEY_LEFT,             toggle);
    TogglePlayerControllableKey(playerid, KEY_RIGHT,            toggle);
    TogglePlayerControllableKey(playerid, KEY_CROUCH,           toggle);
    TogglePlayerControllableKey(playerid, KEY_JUMP,             toggle);
    TogglePlayerControllableKey(playerid, KEY_FIRE,             toggle);
    TogglePlayerControllableKey(playerid, KEY_SECONDARY_ATTACK  toggle);
}



Re: Suggestions Thread - Biesmen - 15.01.2013

pawn Код:
native EnableProperlyPlayerAndVehicleSynchronisation()
Love to see this comin'!

New parameter at the "TogglePlayerControllable" native.
pawn Код:
TogglePlayerControllable(playerid, bool:MovementToggle, bool:AimToggle)
If the AimToggle will be set to 1(true) and 0(false), then the player who has been frozen will still be able to aim(and turn around)


Re : Suggestions Thread - lacalau33 - 15.01.2013

Код:
Drop(playerid);
Silently disconnect the player from the server (not kicked, forced to reconnect).


Re: Suggestions Thread - Lorenc_ - 15.01.2013

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
pawn Код:
native EnableProperlyPlayerAndVehicleSynchronisation()
Love to see this comin'!

New parameter at the "TogglePlayerControllable" native.
pawn Код:
TogglePlayerControllable(playerid, bool:MovementToggle, bool:AimToggle)
If the AimToggle will be set to 1(true) and 0(false), then the player who has been frozen will still be able to aim(and turn around)
Try the idle stance animation and enable freeze (on ApplyAnimation), hopefully the camera should be free whilst your character is frozen.


Re: Suggestions Thread - Kyle - 15.01.2013

Maybe skin offsets? Size information on skins.

E.G - Height, width etc.


Re: Suggestions Thread - Kyle - 15.01.2013

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
Offsets from where to what? And size information you can get yourself.
If I remember correctly, Kalcor added vehicle data information... That could of been scripted to work that out.
Yet that was added.


Re: Suggestions Thread - Biesmen - 15.01.2013

Thank you Lorenc, I will try it out!

I've come up with a new suggestion as well, right now.
Since we can change object's textures, can we change the weapon's textures as well? Like a camouflage.
The native:
pawn Код:
native SetWeaponTexture(WeaponID, sprite[], transparency);
native SetWeaponTextureForPlayer(PlayerID, WeaponID, sprite[], transparency);
If the sprite value will be "0", the weapon will return to it's original state.


Re: Suggestions Thread - Jay_ - 15.01.2013

Quote:
Originally Posted by KyleSmith
Посмотреть сообщение
If I remember correctly, Kalcor added vehicle data information... That could of been scripted to work that out.
Yet that was added.
A new native was added for retrieving model information in 0.3e, if this is what you mean.

https://sampwiki.blast.hk/wiki/GetVehicleModelInfo


Re: Suggestions Thread - Admigo - 16.01.2013

Maybe usage of Colour Embedding in textdraws will be great like.


Re: Suggestions Thread - beaz - 16.01.2013

Would be cool if sa-mp 0.3x would allow to change player skins to own created ones.
Also it would be cool if we could format textdraw string with varous colors and not only with gametext ones. something like this "{FF0000}Welcome to {FFF000F}Super Roleplay {0x0FFFFFF}!"