27.02.2013, 14:16
pawn Код:
CMD:v(playerid, params[])
{
new Float:OldPos[4], Id, vehicle;
if(sscanf(params, "s[60]dd", params[0], params[1], params[2])) return SendClientMessage(playerid, Laranja, "-* Uso й /v [ Nome veнculo ], [Cor 1], [Cor 2]");
GetPlayerPos(playerid, OldPos[0], OldPos[1], OldPos[2]);
GetPlayerFacingAngle(playerid, OldPos[3]);
if(params[0] < 400 || params[0] > 611) return SendClientMessage(playerid, Laranja, "-* O nome nгo foi encontrado.");
//params[0] = GetVehicleModelIDFromName(Id);
vehicle = CreateVehicle(params[0], OldPos[0], OldPos[1], OldPos[2], OldPos[3], params[1], params[2], false);
PutPlayerInVehicle(playerid, vehicle, 0);
return 1;
}
pawn Код:
CMD:v(playerid, params[])
{
new
Id[60],
Vx,
Vr
;
new Float:x, Float:y, Float:z;
if(sscanf(params, "s[60]dd", Id, params[1], params[2])) return SendClientMessage(playerid, Laranja, "-* Uso й /v [ Nome veнculo ], [Cor 1], [Cor 2]");
GetPlayerPos(playerid, x, y, z);
Vr = GetVehicleModelIDFromName(Id);
if(Vr < 400 || Vr > 611) return SendClientMessage(playerid, Laranja, "-* O nome nгo foi encontrado.");
Vx = CreateVehicle(Vr, x, y, z, 0, params[1], params[2], false);
PutPlayerInVehicle(playerid, Vx, 0);
return 1;
}