A little help with cmd
#1

pawn Код:
COMMAND:setovehcol(playerid, params[])
{
    new orgid,col1,col2;
    if(PlayerData[playerid][AdminLevel] != 5) return 0;
    if(sscanf(params,"iii",orgid,col1,col2)) return SendClientMessage(playerid,Grey,"USAGE: /setovehcol [orgid] [col1] [col2]");
    if(!DoesOrgExist(orgid))return SendClientMessage(playerid,Grey,"That Organization does not exist.");
    format(String,sizeof(String),"UPDATE orgvehs SET Color1 = %d, Color2 = %d WHERE `ID` = %d LIMIT 1",col1,col2,orgid);
    mysql_query(String);
    for(new i=1; i<9; i++)
    {
    ChangeVehicleColor(OrgInfo[orgid][Vehicle][i],col1,col2);
    OrgInfo[orgid][VehColor1] = col1;
    OrgInfo[orgid][VehColor2] = col2;
    }
    format(String,sizeof(String),"You have changed the color of all vehicles, in organization %s | Color1: %i | Color2: %i",OrgInfo[orgid][oName],col1,col2);
    SendClientMessage(playerid,Aqua,String);
    return 1;
}
I have 8 org vehicles and i want 8 of them to be saved. But then only the first one on the table is being save . how do i make all 8 of them in the table being saved? o.O

Table example:
Reply
#2

+rep if you help me :/ , anyone?
Reply
#3

maybe a loop?
Reply
#4

It wouldn't work :/ It will always keep saving the first table
Reply
#5

help
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)