01.02.2015, 13:38
How should I put this command in y_ini..?
PHP код:
CMD:addcar(playerid, params[])
{
new tmp[256];
tmp = strtok(params,Index);
new hid = strval(tmp);
if(IsPlayerInAnyVehicle(playerid))
{
new Float:X,Float:Y,Float:Z,Float:Angle;
GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
GetVehicleZAngle(GetPlayerVehicleID(playerid), Angle);
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
dini_IntSet(HouseFile(hid),"vModel",model);
dini_FloatSet(HouseFile(hid),"vX",X);
dini_FloatSet(HouseFile(hid),"vY",Y);
dini_FloatSet(HouseFile(hid),"vZ",Z);
dini_FloatSet(HouseFile(hid),"vAng",Angle);
}
else return SendClientMessage(playerid,-1,"You need to be in a vehicle to add a house car");
return 1;
}