SA-MP Forums Archive
Dini => Y_INI - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dini => Y_INI (/showthread.php?tid=561133)



Dini => Y_INI - EmpireSk - 01.02.2015

How should I put this command in y_ini..?

PHP код:
CMD:addcar(playeridparams[])
{
    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), XYZ);
        
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;