Suggestions Thread

pawn Код:
native SetObjectDestructible(objectid);
Reply

i know you can't create this but i like
pawn Код:
CreatePlayerVideo( playerid, url, x, y)
CreateVideo(url, x, y)
StopPlayerVideo(playerid)
StopVideo(playerid)
Example
pawn Код:
CMD:gangnam(playerid,params[])
{
 CreateVideo("http://www.youtube.com/watch?v=9bZkp7q19f0",150,150);
 return 1;
}
FIX ALL OBJECT THAT MAKES ME CRASH!
Reply

Please create a callback
Код:
OnVehicleTakeDamage (vehicleid, issuerid, Float: Amount, weaponid)
If it is too difficult to synchronize callback please at least
Код:
OnPlayerGiveVehicleDamage (playerid, vehicleid, Float: Amount, weaponid)
Reply

Quote:
Originally Posted by windrush
Посмотреть сообщение
i know you can't create this but i like
pawn Код:
CreatePlayerVideo( playerid, url, x, y)
CreateVideo(url, x, y)
StopPlayerVideo(playerid)
StopVideo(playerid)
I suggest this:

pawn Код:
native CreateVideoStream(url,x,y);//creates a video stream which can be shown for players
native VideoStreamSize(streamid,x,y);//change a size of video window/box
native VideoStreamShowForPlayer(playerid,streamid);//Shows a video box for a player
native VideoStreamHideForPlayer(playerid,streamid);//you know what it is
native VideoStreamStartForPlayer(playerid,streamid,starttime=0);//Start video for player from a current second
native VideoStreamStopForPlayer(playerid,streamid);//Stops a video
native VideoStreamBoxColor(streamid,color);//change a color of a video box

//callbacks
forward OnVideoStreamStarted(streamid,playerid); Called when used VideoStreamStartForPlayer
forward OnVideoStreamStopped(streamid,playerid);//called when used VideoStreamStopForPlayer or wehn the video ends
Example:
pawn Код:
new Video:gangnam;
public OnGameModeInit()
{
gangnam=CreateVideoStream("examplesite.com/gangnam.avi",50,50);
VideoStreamSize(gangnam,500,500);
VideoStreamBoxColor(gangnam,0xFFFF00);
return 1;
}

CMD:gangnam(playerid,params[])
{
 VideoStreamShowForPlayer(playerid,gangnam);
VideoStreamStartForPlayer(playerid,gangnam);
 return 1;
}

public OnVideoStreamStopped(streamid,playerid)
{
if(streamid == gangnam) return VideoStreamHideForPlayer(playerid,streamid);
return 1;
}
Reply

AND my second suggestion for new dialogs:
pawn Код:
native ShowPlayerDialogEx(playerid,dialogid,style,title[],content[],button1[],button2[],button3[],button4[]);
//playerid - you know what it is
//dialogid - you know this too
//style - dialog style
//title - the dialog title
//content - what is written in the dialig
//button1;button2(optional) etc... - buttons for this dialog.

forward OnDialogResponseEx(playerid,dialogid,listitem,buttonid);//callback for new dialog type
Example:

pawn Код:
CMD:testdialog(playerid,params[])
{
 ShowPlayerDialogEx(playerid,1000,DIALOG_STYLE_LIST,"Test DIalog","Hello! This is the test dialog!\nPress 'Cancel' to close it, \n'Next' to go to the next dialog, \m'Prev' to go to the previous dialog, or \n'Vehicles' to go to vehicles spawner","Vehicles","Next","Prev","Cancel");
 return 1;
}

public OnDialogResponseEx(playerid,dialogid,listitem,buttonid)
{
if(buttonid == 0) OpenVehicleSpawner//shows vehicles spawner for player
if(buttonid == 1) ShowPlayerDialog(.......);//example to show player next dialog
if(buttonid == 2) ShowPlayerDialog(.......);//example to show player previous dialog
if(buttonid == 3) return 0;//do nothing and close :)
return 1;
}
Reply

Quote:
Originally Posted by windrush
Посмотреть сообщение
i know you can't create this but i like
pawn Код:
CreatePlayerVideo( playerid, url, x, y)
CreateVideo(url, x, y)
StopPlayerVideo(playerid)
StopVideo(playerid)
Example
pawn Код:
CMD:gangnam(playerid,params[])
{
 CreateVideo("http://www.youtube.com/watch?v=9bZkp7q19f0",150,150);
 return 1;
}
Neah, "CreateVideo" will lags the server i think, and why we need videos in-game? ...

My suggestion:
- Allow in PlayAudioStreamForPlayer to use ******* links, and the music to start play
Reply

Quote:
Originally Posted by Edvin
Посмотреть сообщение
My suggestion:
- Allow in PlayAudioStreamForPlayer to use ******* links, and the music to start play
https://sampforum.blast.hk/showthread.php?tid=290595.
Reply

pawn Код:
public OnPlayerRender(playerid); // it's called when a new frame is processed.
public OnPlayerPreRender(playerid); // it's called before the new frame is processed.
Reply

Quote:
Originally Posted by Libra_PL
View Post
Looks nice. Could you tell where can I find a list of codes like these?
http://www.gtamodding.com/index.php?...ist_of_opcodes
Reply

Quote:
Originally Posted by Lorenc_
View Post
I hope these codes are valid:

0501- "set player can do drive by" - TogglePlayerDriveby(player handle, int)
03F5 - "set car can be damaged" - ToggleVehicleVulnerable(car handle, int)
02CE - "get ground z for 3d cord" - GetGroundZFromCoords(flt, flt, flt, var)
02CC - "is object on screen" - IsObjectOnScreen(object handle)
Come on Kalcor, he give you a codes, only what you need to do is include it to SA-MP and make functions.
Lorenc_ it will be the best if you include this codes in your first post.
Reply

I don't know if this has been suggested before, so excuse me if it has.

Can there be an increase of the amount of characters we can send via SendClientMessage(...)?
ATM, is it like 150-200(don't remember) the max cells that function can take.. moreover, it doesn't even give you some kind of warning, or anything related to this matter. Also, even on 640x480 resolution the text won't go further the cash textdraw on the top right, unless you write something like this "wwwwwwwwwww", the W is too wide for some reason, can the font(if possible) be changed, just like the original Pawno program where all the letters have the same letter size?
Reply

Quote:

is it like 150-200(don't remember) the max cells that function can take.. moreover

128.

Quote:

it doesn't even give you some kind of warning, or anything related to this matter.

pawn Code:
if(strlen(text) > 128)
{
SendClientMessage(playerid, -1, "ERROR: Can't send a message longer than 128 characters.");
return true;
}
Atleast.. i guess you can use string with bigger cells but.. You shouldn't use 256 string arrays

Anyway.. try to split player message on two and send in the new line a second part of the message.

Quote:

0501- "set player can do drive by" - TogglePlayerDriveby(player handle, int)

pawn Code:
new bool: TogDB[MAX_PLAYERS];

stock TogglePlayerDriveby(playerid, bool: set)
{
if(set)TogDB[playerid] = true;
else TogDB[playerid] = false;
return set;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(TogDB[playerid])SetPlayerArmedWeapon(playerid, 0);
else SetPlayerArmedWeapon(playerid, GetPlayerWeapon(playerid));
}
return true;
}
Reply

Quote:
Originally Posted by Riddick94
View Post
128.


pawn Code:
if(strlen(text) > 128)
{
SendClientMessage(playerid, -1, "ERROR: Can't send a message longer than 128 characters.");
return true;
}
Atleast.. i guess you can use string with bigger cells but.. You shouldn't use 256 string arrays

Anyway.. try to split player message on two and send in the new line a second part of the message.
Maximum characters in a line: 128, maximum characters: 144 (with colors). Also, he is talking about SendClientMessage.

I like it how it is now.
Reply

055E - increase player max health
0186 - Creates a blip and an arrow on the vehicle
0187 - Creates a blip and an arrow on the character
00AD - Sets the car's max speed.
04C5 - has char been photographed
0581 - display radar
055D - make player fire proof
Reply

Quote:
Originally Posted by Y_Less
View Post
My bad, forget about that one.

Quote:
Originally Posted by Y_Less
View Post
Used to exist, but was removed because it caused problems (I can't remember what they were, possibly major lag).
I remember it was, and that was a good thing, would be good if it can come back.

Quote:
Originally Posted by Y_Less
View Post
GetPlayerWeapon in OnPlayerKeyStateChange.
I thought about camera effect for nearest players.
Reply

0547 - callback OnPlayerTouchedVehicle(playerid, vehicleid)
054A - To can destroy a vehicle without a player into.
Reply

Quote:
Originally Posted by gabyk
View Post
0547 - callback OnPlayerTouchedVehicle(playerid, vehicleid)
054A - To can destroy a vehicle without a player into.
Would be great, both of them.

The first callback should avoid vehicle moving if it's unoccupied (handbrake for RPs).
About second thing.. i know about OnUnoccupiedVehicleUpdate but it won't work as accurately as ready function.
Reply

Quote:
Originally Posted by Lorenc_
View Post
03F5 - "set car can be damaged" - ToggleVehicleVulnerable(car handle, int)
02CE - "get ground z for 3d cord" - GetGroundZFromCoords(flt, flt, flt, var)
1) Get/SetVehicleHealth
2) MapAndreas


Quote:
Originally Posted by QuaTTrO
View Post
Come on Kalcor, he give you a codes, only what you need to do is include it to SA-MP and make functions.
Reply

Quote:
Originally Posted by QuaTTrO
View Post
Come on Kalcor, he give you a codes, only what you need to do is include it to SA-MP and make functions.
Lorenc_ it will be the best if you include this codes in your first post.


I don't think you should be posting about matters you have completely no clue about.
Reply

If everyone are replying to my post with a picture, i will do it too:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)