28.04.2016, 16:11
pawn Код:
CMD:veiculo(playerid, params[])
{
new
d, d_ , Float:Pos[4] , string[128];
GetPlayerPos(playerid, Pos[0] , Pos[1] , Pos[2]);
GetPlayerFacingAngle(playerid, Pos[3]);
if(sscanf(params, "dd", d , d_)) return SendClientMessage(playerid, -1, "USE /veiculo [id] [ tempo de respawn ]");
CreateVehicle(d , Pos[0] , Pos[1] , Pos[2], Pos[3], 1 , 1 , d_);
new File:Veiculos = fopen("veiculos.txt", io_append);
format(string, sizeof(string), "CreateVehicle(%d , %f , %f , %f , %f , 1 , 1 , %d);", d , Pos[0] , Pos[1] , Pos[2] , Pos[3] , d_ );
fwrite(Veiculos, string);
fclose(Veiculos);
return 1;
}