Help to work with this strirng
#1

I wanna to do a system, but i need some help to work with string:

How to do it:
Код:
new Label[][] = {
    {1000, "Intro", "Complete text description, with examples\nNew lines and everything to explain."},
    {1000, "Intro", "Complete text description, with examples\nNew lines and everything to explain."},
    {1000, "Intro", "Complete text description, with examples\nNew lines and everything to explain."},
    {1000, "Intro", "Complete text description, with examples\nNew lines and everything to explain."},
    {1000, "Intro", "Complete text description, with examples\nNew lines and everything to explain."},
};

CMD:label(playerid) {
	new index = labelStatus[playerid];
	// Intro:
    SendClientMessage(playerid, -1, "Intro is: %s ", ???);
    // Description:
    ShowPlayerDialog(playerid,10000,DIALOG_STYLE_MSGBOX,"INFO:",???,"Ok","");
    // First Value:
    GivePlayerMoneyEx(playerid, ???);
    return 1;
}
Reply
#2

Do you want to send random messages or what?
Reply
#3

PHP код:
enum LabelEnum{
    
Cash,
    
Title[10],
    
MainBody[200]
};
new 
Label[5][LabelEnum] = {
    {
1000"Intro""Complete text description, with examples\nNew lines and everything to explain."},
    {
1000"Intro""Complete text description, with examples\nNew lines and everything to explain."},
    {
1000"Intro""Complete text description, with examples\nNew lines and everything to explain."},
    {
1000"Intro""Complete text description, with examples\nNew lines and everything to explain."},
    {
1000"Intro""Complete text description, with examples\nNew lines and everything to explain."},
};
CMD:label(playerid) {
    new 
labelStatus[playerid],
        
s[90];
    
format(s,90,"Intro is: %s",Label[i][Title]);
    
SendClientMessage(playerid, -1s);
    
format(s,90,"Intro is: %s",Label[i][MainBody]);
    
SendClientMessage(playerid, -1s);
    
GivePlayerMoneyEx(playeridLabel[i][Cash]);
    return 
1;

Reply
#4

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
PHP код:
enum LabelEnum{
    
Cash,
    
Title[10],
    
MainBody[200]
};
new 
Label[5][LabelEnum] = {
    {
1000"Intro""Complete text description, with examples\nNew lines and everything to explain."},
    {
1000"Intro""Complete text description, with examples\nNew lines and everything to explain."},
    {
1000"Intro""Complete text description, with examples\nNew lines and everything to explain."},
    {
1000"Intro""Complete text description, with examples\nNew lines and everything to explain."},
    {
1000"Intro""Complete text description, with examples\nNew lines and everything to explain."},
};
CMD:label(playerid) {
    new 
labelStatus[playerid],
        
s[90];
    
format(s,90,"Intro is: %s",Label[i][Title]);
    
SendClientMessage(playerid, -1s);
    
format(s,90,"Intro is: %s",Label[i][MainBody]);
    
SendClientMessage(playerid, -1s);
    
GivePlayerMoneyEx(playeridLabel[i][Cash]);
    return 
1;

I think that is it...
Thank you +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)