-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dffd55e
commit 59b935d
Showing
13 changed files
with
102 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
int strBuf = ALLOCATE_MEMORY {size} 256 | ||
strBuf = SAMP_GET_CURRENT_SERVER_NAME | ||
// do something to strBuf | ||
SAMP_GET_CURRENT_SERVER_NAME strBuf | ||
// do something to {buffer} strBuf | ||
FREE_MEMORY strBuf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
int textColor, prefixColor | ||
strBufText = ALLOCATE_MEMORY {size} 256 | ||
strBufPrefix = ALLOCATE_MEMORY {size} 256 | ||
if int strBufText, strBufPrefix, textColor, prefixColor = SAMP_GET_CHAT_LINE_PARAMS {chatlineid} 0 // test a valid chatlineid | ||
|
||
if textColor, prefixColor = SAMP_GET_CHAT_LINE_PARAMS {chatlineid} 0 {buffertext} strBufText {bufferprefix} strBufPrefix // test a valid chatlineid | ||
then | ||
// do something to strBufText, strBufPrefix, textColor, prefixColor | ||
else | ||
// this section will not execute | ||
end | ||
if int strBufText, strBufPrefix, textColor, prefixColor = SAMP_GET_CHAT_LINE_PARAMS {chatlineid} 100 // test an invalid chatlineid | ||
|
||
if textColor, prefixColor = SAMP_GET_CHAT_LINE_PARAMS {chatlineid} 100 {buffertext} strBufText {bufferprefix} strBufPrefix // test an invalid chatlineid | ||
then | ||
// this section will not execute | ||
else | ||
// chatlineid is not valid | ||
end | ||
|
||
FREE_MEMORY {address} strBufText | ||
FREE_MEMORY {address} strBufPrefix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
if IS_CHAR_SITTING_IN_ANY_CAR $scplayer | ||
then | ||
int myCar = STORE_CAR_CHAR_IS_IN_NO_SAVE $scplayer | ||
int myCarID = SAMP_GET_CAR_ID myCar | ||
// Construct a Bitstream holding a SampRpc.DamageCar data | ||
int myBitStream = SAMP_RAKNET_CREATE_BITSTREAM // create bitstream object with class Bitstream | ||
SAMP_RAKNET_BITSTREAM_WRITE myBitStream {value} myCarID {datatype} SampBitStreamDataType.Short {datasize} DataTypeSize.Short // CarID | ||
SAMP_RAKNET_BITSTREAM_WRITE myBitStream {value} 0xFFFFFFFF {datatype} SampBitStreamDataType.Int {datasize} DataTypeSize.Int // bodyflags | ||
SAMP_RAKNET_BITSTREAM_WRITE myBitStream {value} 0xFFFFFFFF {datatype} SampBitStreamDataType.Int {datasize} DataTypeSize.Int // doorflags | ||
SAMP_RAKNET_BITSTREAM_WRITE myBitStream {value} 0xFF {datatype} SampBitStreamDataType.Byte {datasize} DataTypeSize.Byte // lightflags | ||
SAMP_RAKNET_BITSTREAM_WRITE myBitStream {value} 0xFF {datatype} SampBitStreamDataType.Byte {datasize} DataTypeSize.Byte // wheelflags | ||
// | ||
// Bitstream is ready to be transmitted | ||
SAMP_RAKNET_SEND_RPC_TO_SERVER {rpcid} SampRpc.DamageCar {bitstream} myBitStream | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
int myRCONCommand = ALLOCATE_MEMORY 58 | ||
myRCONCommand = STRING_FORMAT "This_is_a_very_long_String_Example_we_will_send_to_Server" | ||
int textLength = SF_STRLEN myRCONCommand | ||
// Construct a Bitstream holding a SampRpc.RconCommand data | ||
int myBitStream = SAMP_RAKNET_CREATE_BITSTREAM // create bitstream object with class Bitstream | ||
SAMP_RAKNET_BITSTREAM_WRITE myBitStream {value} SampRpc.RconCommand {datatype} SampBitStreamDataType.Byte {datasize} DataTypeSize.Byte // PacketID | ||
SAMP_RAKNET_BITSTREAM_WRITE myBitStream {value} textLength {datatype} SampBitStreamDataType.Int {datasize} DataTypeSize.Int // TextLength | ||
SAMP_RAKNET_BITSTREAM_WRITE myBitStream {value} myRCONCommand {datatype} SampBitStreamDataType.Array {datasize} textLength // CMDText | ||
// | ||
// Bitstream is ready to be transmitted | ||
RAKNET_SEND_BIT_STREAM {bitstream} myBitStream {priorityid} | ||
FREE_MEMORY myRCONCommand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.873 | ||
0.874 |