How to compare vehicle and player's interior?
#7

Quote:
Originally Posted by rfr
Посмотреть сообщение
PHP код:
#include <a_samp>
#include <izcmd>
#include <sscanf2>
new vInt[MAX_PLAYERS] = 0;
CMD:vehicleint(playeridparms[]) {
    new 
vehicle AddStaticVehicle(5592543.7505, -21.834527.189952.6054, -1, -1);
    
vInt[playerid] = LinkVehicleToInterior(vehicle6);
    if(
GetPlayerInterior(playerid) == vInt[playerid])
    {
        
//execute code here
    
}
    return 
1;

idk

or

PHP код:
CMD:vehicleint1(playeridparms[]) {
    new 
vehicle AddStaticVehicle(5592543.7505, -21.834527.189952.6054, -1, -1);
    
vInt[playerid] = LinkVehicleToInterior(vehicle6);
    new 
string[64];
    
format(stringsizeof(string),"vehicle interior is %i.",vInt[playerid]);
    
SendClientMessage(playerid, -1string);
    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
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)