Save? Maybe this loop? - 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: Save? Maybe this loop? (
/showthread.php?tid=570287)
Save? Maybe this loop? -
PURG3D - 08.04.2015
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;
}
AW: Save? Maybe this loop? -
Mencent - 08.04.2015
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(playerid, COLOR_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
Re: AW: Save? Maybe this loop? -
PURG3D - 08.04.2015
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(playerid, COLOR_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