Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

[PROBLEM] Tram not accessible

$
0
0
In this way, I can get into all rc vehicles except the tram...

Why??????

PHP Code:

#include <a_samp>
#include <sscanf2>
#include <zcmd>
#include <cuffs>
#define RC_ENTER_RANGE 8
new RCVehicles[] = {
        
441,
        
464,
        
465,
        
501,
        
564,
        
594,
        
449
};
main()
{
    print(
"\n----------------------------------");
    print(
" By Crystal94");
    print(
"----------------------------------\n");
}


public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
        if(
newkeys 16)
        {
                new 
Float:x,Float:y,Float:z;
                if(
IsPlayerInAnyVehicle(playerid) && IsVehicleRCVehicle(GetPlayerVehicleID(playerid)))
                {
                        
GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
                        
SetPlayerPos(playerid,x,y,z+1.8);
                        return 
1;
                }
                for(new 
vMAX_VEHICLESv++)
                {
                        
GetVehiclePos(v,x,y,z);
                        if(
IsPlayerInRangeOfPoint(playerid,RC_ENTER_RANGE,x,y,z) && IsVehicleRCVehicle(v))
                        {
                        
PutPlayerInVehicle(playerid,v,0);
                        return 
1;
                        }
                }
        }
        return 
1;
}

stock IsVehicleRCVehicle(vehicleid)
{
        for(new 
v6v++)
        {
            if(
GetVehicleModel(vehicleid) == RCVehicles[v]) return 1;
        }
        return 
0;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>