Quote:
Originally Posted by rfr
PHP код:
#include <a_samp>
#include <izcmd>
#include <sscanf2>
new vInt[MAX_PLAYERS] = 0;
CMD:vehicleint(playerid, parms[]) {
new vehicle = AddStaticVehicle(559, 2543.7505, -21.8345, 27.1899, 52.6054, -1, -1);
vInt[playerid] = LinkVehicleToInterior(vehicle, 6);
if(GetPlayerInterior(playerid) == vInt[playerid])
{
//execute code here
}
return 1;
}
idk
or
PHP код:
CMD:vehicleint1(playerid, parms[]) {
new vehicle = AddStaticVehicle(559, 2543.7505, -21.8345, 27.1899, 52.6054, -1, -1);
vInt[playerid] = LinkVehicleToInterior(vehicle, 6);
new string[64];
format(string, sizeof(string),"vehicle interior is %i.",vInt[playerid]);
SendClientMessage(playerid, -1, string);
return 1;
}
idk
|
https://sampwiki.blast.hk/wiki/LinkVehicleToInterior
your code wont work properly because function not returns new id lol
this should work:
Код HTML:
new interiorVehicle[ MAX_VEHICLES ];
#if defined _ALS_LinkVehicleToInterior
#undef LinkVehicleToInterior
#else
#define _ALS_LinkVehicleToInterior
#endif
#define LinkVehicleToInterior interiorVehicle[ %0 ] = %1
// usage interiorVehicle[ vehicleid ] xdd