SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 28/06/2015, 07:34 PM   #51
kristo
Banned
 
Join Date: Jun 2012
Location: Estonia
Posts: 352
Reputation: 179
Default Re: Packed-safe format!

string.inc natives work properly with packed strings.
kristo is offline   Reply With Quote
Old 28/06/2015, 08:06 PM   #52
LazyB0y
Huge Clucker
 
LazyB0y's Avatar
 
Join Date: Feb 2014
Location: Pakistan
Posts: 276
Reputation: 15
Default Re: Packed-safe format!

Nice
__________________
LazyB0y is offline   Reply With Quote
Old 28/06/2015, 09:57 PM   #53
CodeStyle175
Banned
 
Join Date: Apr 2014
Posts: 455
Reputation: 35
Default Re: Packed-safe format!

But
PHP Code:
        new Packed:string[100];
    
format(string,sizeof(string),!"{FFFFFF}hello\n{FF0000}hello\n9GAG");
    print(string); 
and it prints out {FFFFFF}hello
{FF0000}he

what is wrong with colours?
CodeStyle175 is offline   Reply With Quote
Old 30/06/2015, 04:53 PM   #54
vannesenn
Gangsta
 
vannesenn's Avatar
 
Join Date: Feb 2011
Posts: 607
Reputation: 15
Default Re: Packed-safe format!

Quote:
Originally Posted by CodeStyle175 View Post
But
PHP Code:
        new Packed:string[100];
    
format(string,sizeof(string),!"{FFFFFF}hello\n{FF0000}hello\n9GAG");
    print(string); 
and it prints out {FFFFFF}hello
{FF0000}he

what is wrong with colours?
PHP Code:
        new Packed:string[100];
    
format(string,sizeof(string),!"hello\n{FF0000}hello\n9GAG");
    print(string); 
Default color is white for dialogs(fff) so you don't need {FFFFFF} at 1st hello
vannesenn is offline   Reply With Quote
Old 13/03/2016, 03:20 AM   #55
Kar
Banned
 
Join Date: May 2010
Location: Black Asylum
Posts: 2,938
Reputation: 538
Default Re: Packed-safe format!

Can someone add a download for this?
Kar is offline   Reply With Quote
Old 04/01/2018, 06:41 AM   #56
VincenzoDrift
Little Clucker
 
VincenzoDrift's Avatar
 
Join Date: Jun 2014
Posts: 47
Reputation: 3
Default Re: Packed-safe format!

The link no longer works. Can someone link the file?
__________________
Sorry for my bad english
VincenzoDrift is offline   Reply With Quote
Old 04/01/2018, 11:52 AM   #57
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,193
Reputation: 420
Default Re: Packed-safe format!

Quote:
Originally Posted by VincenzoDrift View Post
The link no longer works. Can someone link the file?
There you go guys enjoy it ^^
Attached Files
File Type: zip ps-format.zip (1.6 KB, 56 views)
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter is offline   Reply With Quote
Old 04/01/2018, 02:31 PM   #58
GangstaSunny.
Huge Clucker
 
GangstaSunny.'s Avatar
 
Join Date: Apr 2010
Location: Hamburg - Germany
Posts: 244
Reputation: 41
Unhappy Re: Packed-safe format!

Quote:
Originally Posted by vannesenn View Post
PHP Code:
        new Packed:string[100];
    
format(string,sizeof(string),!"hello\n{FF0000}hello\n9GAG");
    print(string); 
Default color is white for dialogs(fff) so you don't need {FFFFFF} at 1st hello
isnt the color blue for msgbox?
GangstaSunny. is offline   Reply With Quote
Old 04/01/2018, 03:21 PM   #59
Zeth
Huge Clucker
 
Zeth's Avatar
 
Join Date: Feb 2017
Location: Titan
Posts: 428
Reputation: 114
Default Re: Packed-safe format!

Quote:
Originally Posted by GangstaSunny. View Post
isnt the color blue for msgbox?
No its White.
Zeth is offline   Reply With Quote
Old 13/07/2018, 01:53 AM   #60
DuyDang2412
Big Clucker
 
Join Date: Feb 2017
Posts: 168
Reputation: 2
Default Re: Packed-safe format!

Do I need to do like this?
Quote:
SendClientMessage(playerid, -1, !"abcxyz");
or I just use it in format?
Quote:
new Packedtring[7];
format(string, sizeof(string), !"abcxyz");
SendClientMessage(playerid, -1, !string);
or can I even use it in a mysql query?
Quote:
new Packed:query[128];
mysql_format(handle, query, sizeof(query), !"SELECT null FROM `abcxyz` WHERE 1=%d", 1);
Can someone explain to me when to use packed-safe string?
DuyDang2412 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Packed strings in PAWN Emmet_ Tutorials 16 25/12/2013 10:37 AM
Packed String Support MP2 Scripting Help 3 30/03/2013 08:08 AM
packed string problem KoczkaHUN Help Archive 0 08/08/2011 11:11 AM
Packed strings - speed? RSX Help Archive 0 30/08/2010 02:48 PM
Packed Strings Nekom Help Archive 2 10/03/2010 11:31 AM


All times are GMT. The time now is 03:23 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.