How to convert this?
#7

look to NativeFunctionExample.cs script:

Код:
        public void SpawnPlayerCar(int playerid)
        {
            int model = 429; //banshee
            Samp.Util.FloatRef x = 0.0F, y = 0.0F, z = 0.0F, angle = 0.0F; // must use FloatRef class to return floats from native function, same goes for StringRef & IntRef
            Samp.Client.NativeFunctionRequestor.RequestFunction("GetPlayerPos", playerid, x, y, z);
            NativeFunctionRequestor.RequestFunction("GetPlayerFacingAngle", playerid, angle);
            int vehicleid = NativeFunctionRequestor.RequestFunction("CreateVehicle", model, x.Value, y.Value, z.Value, angle.Value, 0, 0, 300);// note that we use x.Value now
            NativeFunctionRequestor.RequestFunction("PutPlayerInVehicle", playerid,vehicleid,0);
            NativeFunctionRequestor.RequestFunction("SendClientMessage", playerid, 0,"{00FF00}Vehicle Spawned.");
        }
Reply


Messages In This Thread
How to convert this? - by T0pAz - 11.12.2011, 16:01
Re: How to convert this? - by T0pAz - 11.12.2011, 16:36
Re: How to convert this? - by T0pAz - 11.12.2011, 18:19
Re: How to convert this? - by Iain.Gilbert - 11.12.2011, 22:56
Re: How to convert this? - by T0pAz - 12.12.2011, 05:02
Re: How to convert this? - by T0pAz - 12.12.2011, 13:21
Re: How to convert this? - by Iain.Gilbert - 12.12.2011, 14:52
Re: How to convert this? - by T0pAz - 12.12.2011, 15:13
Re: How to convert this? - by Iain.Gilbert - 13.12.2011, 08:44
Re: How to convert this? - by T0pAz - 13.12.2011, 08:48

Forum Jump:


Users browsing this thread: 1 Guest(s)