A command to give a key (selling a vehicle)
#1

Someone would pass me some cmd to sell to another player un vehiculo propio by mysql, here variables of the cars / give id id quantity (currency 0-Money 1-Official currency of the server) and that the player is inside the vehicle, here leave the Variables, it is base oz:

Код:
	// Auto 1
	Float:pOX,
	Float:pOY,
	Float:pOZ,
	Float:pOA,
	VE1,
	VE2,
	VE3,
	VE4,
	vMonedaa,
	vModelo,
	vGas,
	vinterior,
	vvw,
	vColor1,
	vColor2,
	Float:pVidaV,
	vBaul,
	vBaul2,
	vBaul3,
	vBaul4,
	vBaul5,
	vBaul6,
	vBaul7,
	vBaul8,
	vPJ,
	vpatente[10],
	vComponentes0,
	vComponentes1,
	vComponentes2,
	vComponentes3,
	vComponentes4,
	vComponentes5,
	vComponentes6,
	vComponentes7,
	vComponentes8,
	vComponentes9,
	vComponentes10,
	vComponentes11,
	vComponentes12,
	vComponentes13,
	vPrecio,
	vTraba,
	Float:vX,
	Float:vY,
	Float:vZ,
	Float:vA,
	vOvw,
	vSeguro,
	vOinterior,
	// Auto 2
	Float:pOX2,
	Float:pOY2,
	Float:pOZ2,
	Float:pOA2,
	V2E1,
	V2E2,
	V2E3,
	V2E4,
	v2Monedaa,
	vModelo2,
	v2Gas,
	v2interior,
	v2vw,
	v2Color1,
	v2Color2,
	Float:pVidaV2,
	v2Baul,
	v2Baul2,
	v2Baul3,
	v2Baul4,
	v2Baul5,
	v2Baul6,
	v2Baul7,
	v2Baul8,
	vPJ2,
	v2patente[10],
	v2Componentes0,
	v2Componentes1,
	v2Componentes2,
	v2Componentes3,
	v2Componentes4,
	v2Componentes5,
	v2Componentes6,
	v2Componentes7,
	v2Componentes8,
	v2Componentes9,
	v2Componentes10,
	v2Componentes11,
	v2Componentes12,
	v2Componentes13,
	v2Precio,
	v2Traba,
	Float:v2X,
	Float:v2Y,
	Float:v2Z,
	Float:v2A,
	v2Ovw,
	vSeguro2,
	v2Ointerior,
	// Auto 3
	Float:pOX3,
	Float:pOY3,
	Float:pOZ3,
	Float:pOA3,
	V3E1,
	V3E2,
	V3E3,
	V3E4,
	v3Monedaa,
	vModelo3,
	v3Gas,
	v3interior,
	v3vw,
	v3Color1,
	v3Color2,
	Float:pVidaV3,
	v3Baul,
	v3Baul2,
	v3Baul3,
	v3Baul4,
	v3Baul5,
	v3Baul6,
	v3Baul7,
	v3Baul8,
	vPJ3,
	v3patente[10],
	v3Componentes0,
	v3Componentes1,
	v3Componentes2,
	v3Componentes3,
	v3Componentes4,
	v3Componentes5,
	v3Componentes6,
	v3Componentes7,
	v3Componentes8,
	v3Componentes9,
	v3Componentes10,
	v3Componentes11,
	v3Componentes12,
	v3Componentes13,
	v3Precio,
	v3Traba,
	Float:v3X,
	Float:v3Y,
	Float:v3Z,
	Float:v3A,
	v3Ovw,
	vSeguro3,
	v3Ointerior,
	// Auto 4
	Float:pOX4,
	Float:pOY4,
	Float:pOZ4,
	Float:pOA4,
	V4E1,
	V4E2,
	V4E3,
	V4E4,
	v4Monedaa,
	vModelo4,
	v4Gas,
	v4interior,
	v4vw,
	v4Color1,
	v4Color2,
	Float:pVidaV4,
	v4Baul,
	v4Baul2,
	v4Baul3,
	v4Baul4,
	v4Baul5,
	v4Baul6,
	v4Baul7,
	v4Baul8,
	vPJ4,
	v4patente[10],
	v4Componentes0,
	v4Componentes1,
	v4Componentes2,
	v4Componentes3,
	v4Componentes4,
	v4Componentes5,
	v4Componentes6,
	v4Componentes7,
	v4Componentes8,
	v4Componentes9,
	v4Componentes10,
	v4Componentes11,
	v4Componentes12,
	v4Componentes13,
	v4Precio,
	v4Traba,
	Float:v4X,
	Float:v4Y,
	Float:v4Z,
	Float:v4A,
	v4Ovw,
	vSeguro4,
	v4Ointerior,
	//
Reply
#2

What did i just read? Explain.
Reply
#3

I'm afraid, nobody can help you here.
Reply
#4

I want to create a cmd of a player selling his car to another player that has saved mysql, if they want I do the mysql save myself, the variables are the ones that are air
Reply
#5

If you don't post the code we can't help you.
Reply
#6

it's up.
Reply
#7

That's not the code, this is the vehicle enumerator. Show us the way you are selling the car.
Reply
#8

Haa! I do not have it for that reason I come to ask you one.
Reply
#9

I can't do the code right now since I'm on android but to make it simple.

PHP код:
CMD:sellmycarkeys or CMD:givecarkeys 
then make sure to set who you want to give it.

new giveplayerid, carid;

or you can use showplayerdialog

make a for loop on the your players car to its your max player vehicle.

PHP код:
for(new v; new pveh == MAX_VEHICLEpvehv++); 
now you can make an if else statement if your id does not match any of your car id send a client message to playerid that you don't have that car.
PHP код:
if(CarInfo[carid][CarOwnerId] != playerid); 
//or anyway you cab do it then send a message to yourself that you aren't the owner of this car or you don't own this car
PHP код:
else
CarInfo[carid][CarOwnerId] = giveplayerid;
//You can add other codes if you have any. 
Then you just give the car to the player you want to sell the car.

that's it.

if you understand that you can make it but if you can't pm me on the forums I can help you create it but not until I am using my laptop later.

[EDIT]
i don't understand the enums because it's in spanish/mexican sorry I don't know my global languages.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)