30.01.2011, 01:41
this is my dealership veh code. after the player buys it wont save:
the dialog pops up when the player gets into that dealer veh
Код:
if(dialogid==25) { if(response) { new string[128],name[MAX_PLAYERS]; GetPlayerName(playerid, name, sizeof(name)); Money[playerid] = GetPlayerMoney(playerid); if(Money[playerid]<300000) return SendClientMessage(playerid, red, "You dont have enough money."); tvid[playerid] = CreateVehicle(515,659.2692,1850.1108,6.4836,170.6889,13,88, -1); PutPlayerInVehicle(playerid, tvid[playerid], 0); tmdl[playerid]=GetVehicleModel(tvid[playerid]); format(string, sizeof(string), "INSERT INTO vehs (ID,Name,Model,col1,col2) VALUES (%d,'%s',%d,0,1)", tvid[playerid], name, tmdl[playerid]); mysql_query(string); owner[vid]=GetPlayerName(playerid,name,sizeof(name)); } else { SendClientMessage(playerid, red, "See you next time"); } }