SA-MP Forums Archive
Little Help Please - 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: Little Help Please (/showthread.php?tid=636508)



Little Help Please - Usmanmemon - 28.06.2017

Hello guys i am facing a problem is that credits are showing in same line please help me the codes are below.


PHP Code:
CMD:credits(playeridparams[])
{
    new 
tmp[1000];
    new 
maxcredits dini_Int(AddDirFile(dir_datafilesFILE_TOTALSTAT), "credits");
    if (
maxcredits == 0) return SendClientMessage2(playeridCOLOR_RED"Currently there are no Credits.");
    new 
tmp3[2048];
    for (new 
1<= maxcreditst++)
    {
         
format(tmp50"creditname%d"t);
         
format(tmpsizeof(tmp), "%s"dini_Get(AddDirFile(dir_datafilesFILE_CREDITS), tmp));
         
format(tmp3sizeof(tmp3), "%s%s%s:{FFFFFF} %s"tmp3creditscolor(t), tmpcreditssname(t));
    }
    
SendClientMessage2(playeridCOLOR_ORANGE"-------------------------|");
    
SendClientMessage2(playeridCOLOR_WHITEtmp3);
    
SendClientMessage2(playeridCOLOR_ORANGE"--------------------------");
    return 
1;




Re: Little Help Please - Meller - 28.06.2017

PHP Code:
CMD:credits(playeridparams[]) 

    new 
tmp[1000]; 
    new 
maxcredits dini_Int(AddDirFile(dir_datafilesFILE_TOTALSTAT), "credits"); 
    if (
maxcredits == 0) return SendClientMessage2(playeridCOLOR_RED"Currently there are no Credits."); 
    new 
tmp3[2048]; 
    
SendClientMessage2(playeridCOLOR_ORANGE"-------------------------|"); 
    for (new 
1<= maxcreditst++) 
    { 
         
format(tmp50"creditname%d"t); 
         
format(tmpsizeof(tmp), "%s"dini_Get(AddDirFile(dir_datafilesFILE_CREDITS), tmp)); 
         
format(tmp3sizeof(tmp3), "%s%s%s:{FFFFFF} %s"tmp3creditscolor(t), tmpcreditssname(t)); 
         
SendClientMessage2(playeridCOLOR_WHITEtmp3); 
    } 
    
SendClientMessage2(playeridCOLOR_ORANGE"--------------------------"); 
    return 
1




Re: Little Help Please - Usmanmemon - 28.06.2017

Now it's showing me like this:




Re: Little Help Please - Usmanmemon - 28.06.2017

Bump


Re: Little Help Please - Crystallize - 29.06.2017

I dont know why you retrieve credits from a file why dont you just sendclientmessage?


Re: Little Help Please - IceBilizard - 29.06.2017

PHP Code:
CMD:credits(playeridparams[]) 

    new 
tmp[1000]; 
    new 
maxcredits dini_Int(AddDirFile(dir_datafilesFILE_TOTALSTAT), "credits"); 
    if (
maxcredits == 0) return SendClientMessage2(playeridCOLOR_RED"Currently there are no Credits."); 
    new 
tmp3[2048]; 
    
SendClientMessage2(playeridCOLOR_ORANGE"-------------------------|"); 
    for (new 
1<= maxcreditst++) 
    { 
         
format(tmp50"creditname%d"t); 
         
format(tmpsizeof(tmp), "%s"dini_Get(AddDirFile(dir_datafilesFILE_CREDITS), tmp)); 
         
format(tmp3sizeof(tmp3), "%s%s%s:{FFFFFF} %s\n"tmp3creditscolor(t), tmpcreditssname(t)); 
         
SendClientMessage2(playeridCOLOR_WHITEtmp3); 
    } 
    
SendClientMessage2(playeridCOLOR_ORANGE"--------------------------"); 
    return 
1




Re: Little Help Please - Usmanmemon - 29.06.2017

Quote:
Originally Posted by IceBilizard
View Post
PHP Code:
CMD:credits(playeridparams[]) 

    new 
tmp[1000]; 
    new 
maxcredits dini_Int(AddDirFile(dir_datafilesFILE_TOTALSTAT), "credits"); 
    if (
maxcredits == 0) return SendClientMessage2(playeridCOLOR_RED"Currently there are no Credits."); 
    new 
tmp3[2048]; 
    
SendClientMessage2(playeridCOLOR_ORANGE"-------------------------|"); 
    for (new 
1<= maxcreditst++) 
    { 
         
format(tmp50"creditname%d"t); 
         
format(tmpsizeof(tmp), "%s"dini_Get(AddDirFile(dir_datafilesFILE_CREDITS), tmp)); 
         
format(tmp3sizeof(tmp3), "%s%s%s:{FFFFFF} %s\n"tmp3creditscolor(t), tmpcreditssname(t)); 
         
SendClientMessage2(playeridCOLOR_WHITEtmp3); 
    } 
    
SendClientMessage2(playeridCOLOR_ORANGE"--------------------------"); 
    return 
1

Thanks for you both help but i haved fix by my self i just removed tmp3 from format and it fixed