08.07.2015, 21:32
Consegui resolver a dialog att, agr o problema й assim exemplo: eu tenho 2 veнculos, se eu vender o segundo, tudo bem, agr se eu vender o primeiro a funзгo do modelo pega no segundo tambйm;
Quote:
stock DeletePlayerConce( playerid, SlotID ) { new s[ 128 ]; PConce_ResetVars( playerid ); for( new i; i < MAX_PLAYER_CONCE; ++i ) { format( s, 128, "Concessionaria/%s_CONC_%d.ini", PlayerName( playerid ), SlotID ); switch( DOF2_GetInt( s, "vc_modelo" )) { // Preзos veнculos } SendClientMessage( playerid, COLOR_VERMELHOCLARO, "•~~~~~~~~~~~~[ Veнculo concessionбria vendido ]~~~~~~~~~~~~•" ); format( gStr, sizeof( gStr ), "[ > ] Veнculo %s vendido, valor recebido $%d.", vNome[ DOF2_GetInt( s, "vc_modelo" )-400 ], ( vPreco[ playerid ] * 70 / 100 )); SendClientMessage( playerid, COLOR_BRANCO, gStr ); //SendClientMessage( playerid, COLOR_VERMELHOCLARO, "•~~~~~~~~~~~~[ Veнculo concessionбria vendido ]~~~~~~~~~~~~•" ); sGivePlayerCash( playerid, vPreco[ playerid ] * 70 / 100 ); PlayerConceModelo[ playerid ][ SlotID ][ ConceID ] = -1; PlayerConceConectado[ playerid ][ SlotID ][ ConceID ] = 1; DOF2_FileExists( s ); DOF2_RemoveFile( s ); //fremove( s ); format( gFile, sizeof( gFile ), "Contas/%s.ini", PlayerName( playerid )); DOF2_SetInt( gFile, "Veiculo_Conce", 0 ); pInfo[ playerid ][ Veiculo_Conce ] = 0; } return 1; } |