Save? Maybe this loop?
#1

How can i make this loop .

Like saving all PnS IDs

pawn Код:
CMD:pnssave(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 4)
    {
        SavePayNSpray(id);
        SendClientMessage(playerid, COLOR_YELLOW, "Pay N Spray Repair has been succesfully saved.");
    }
    return 1;

}
Reply
#2

Hello!

Maybe this is what you want.
PHP код:
CMD:pnssave(playerid,params[])
{
    if(
PlayerInfo[playerid][pAdmin] < 4)
    {
        for(new 
i;i<30;i++)
        {
            
SavePayNSpray(i);
        }
        
SendClientMessage(playeridCOLOR_YELLOW"Pay N Spray Repair has been succesfully saved.");
    }
    return 
1;

The 30 you have to adjust to the maximum size of the pay n sprays.

Mencent
Reply
#3

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

Maybe this is what you want.
PHP код:
CMD:pnssave(playerid,params[])
{
    if(
PlayerInfo[playerid][pAdmin] < 4)
    {
        for(new 
i;i<30;i++)
        {
            
SavePayNSpray(i);
        }
        
SendClientMessage(playeridCOLOR_YELLOW"Pay N Spray Repair has been succesfully saved.");
    }
    return 
1;

The 30 you have to adjust to the maximum size of the pay n sprays.

Mencent
I got it.

Thanks for the code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)