interior laag
#1

someone parked cars in interior and now all interior laag.. how i can fix this?
Reply
#2

Remove the cars
Reply
#3

Quote:
Originally Posted by Dice_
View Post
Remove the cars
i can't see cars ... not in map to...!!!
Reply
#4

Quote:
Originally Posted by s3ek
View Post
i can't see cars ... not in map to...!!!
Then how do you know someone parked the cars?
Reply
#5

Respawn vehicles? Make a command for that.
Reply
#6

Make a variable for the car to destroy whenever the player who spawned the car left the server.
Reply
#7

PHP Code:
for(new 0MAX_VEHICLES;i++)
{
     if(
GetVehicleInterior(i) == 0) continue;
     
SetVehicleToRespawn(i);

also make the player be able to spawn only one car

and as afiqiqbal said destroy his vehicle when he leaves
Reply
#8

how ican make if player in any interior ... cant use park command..?

PHP Code:
stock park(playerid)
{
    if(
VehicleInfo[GetPlayerVehicleID(playerid)][Temp] == 1) {
        return 
SendClientMessage(playeridCOLOR_ORANGE"This vehicle is only temporary and some commands may not work!");
    }
    if(
PlayerInfo[playerid][LoggedIn] == 0) {
        
SendClientMessage(playeridCOLOR_BRIGHTRED"You must be logged in to use this feature");
        return 
1;
    }
    if(
PlayerInfo[playerid][Jailed] == 1) {
        
SendClientMessage(playeridCOLOR_BRIGHTRED"You are in jail and cannot use this feature");
        return 
1;
    }
    if(
VehicleInfo[GetPlayerVehicleID(playerid)][buybar] == 1) {
        
SendClientMessage(playeridCOLOR_BRIGHTRED"This vehicle is un-buyable and these features will not work!");
        return 
1;
    }
    if((
PlayerInfo[playerid][vowner] == 0) && (PlayerInfo[playerid][vowner2] == 0) && (PlayerInfo[playerid][vowner3] == 0) && (PlayerInfo[playerid][vowner4] == 0) && (PlayerInfo[playerid][vowner5] == 0) && (PlayerInfo[playerid][vowner6] == 0)) {
            if((
PlayerInfo[playerid][vowner7] == 0) && (PlayerInfo[playerid][vowner8] == 0)) {
            
SendClientMessage(playeridCOLOR_BRIGHTRED"You must first own a vehicle before you can use this feature!");
            return 
1;
        }
    }
//    if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You need $10000 to park your car!");
    
if(IsPlayerInAnyVehicle(playerid)) {
        if (
strcmp(VehicleInfo[GetPlayerVehicleID(playerid)][owner],PlayerInfo[playerid][name],false) == 0) {
            new 
Float:spx,Float:spy,Float:spz;
            new 
Float:spa;
    
//        GivePlayerMoney(playerid,-10000);
            
GetVehiclePos(GetPlayerVehicleID(playerid),spx,spy,spz);
            
GetVehicleZAngle(GetPlayerVehicleID(playerid),spa);
            
VehicleInfo[GetPlayerVehicleID(playerid)][x_spawn] = spx;
            
VehicleInfo[GetPlayerVehicleID(playerid)][y_spawn] = spy;
            
VehicleInfo[GetPlayerVehicleID(playerid)][z_spawn] = spz;
            
VehicleInfo[GetPlayerVehicleID(playerid)][za_spawn] = spa;
            
format(securemess,sizeof(securemess),"You have just parked your %s at your current location... it will respawn here in future!"VehicleInfo[GetPlayerVehicleID(playerid)][name]);
            
SendClientMessage(playeridCOLOR_GREENsecuremess);
            return 
1;
        }
        else {
            
SendClientMessage(playeridCOLOR_BRIGHTRED"You do not own this vehicle and cannot park it!");
            return 
1;
        }
    }
    else {
        
SendClientMessage(playeridCOLOR_BRIGHTRED"You must be in a vehicle to use this feature");
        return 
1;
    }

Reply
#9

Quote:
Originally Posted by Whatname
View Post
PHP Code:
for(new 0MAX_VEHICLES;i++)
{
     if(
GetVehicleInterior(i) == 0) continue;
     
SetVehicleToRespawn(i);

also make the player be able to spawn only one car

and as afiqiqbal said destroy his vehicle when he leaves
sorry i not use mysql..
Reply
#10

Quote:
Originally Posted by s3ek
View Post
sorry i not use mysql..
It isnt mysql it is a basic pawno function... Just put it under some timer or some thing you use in your gamemode so it will check every now and then
Reply
#11

Code:
stock park(playerid) 
{ 
    if(VehicleInfo[GetPlayerVehicleID(playerid)][Temp] == 1) { 
        return SendClientMessage(playerid, COLOR_ORANGE, "This vehicle is only temporary and some commands may not work!"); 
    } 
    if(PlayerInfo[playerid][LoggedIn] == 0) { 
        SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this feature"); 
        return 1; 
    } 
    if(PlayerInfo[playerid][Jailed] == 1) { 
        SendClientMessage(playerid, COLOR_BRIGHTRED, "You are in jail and cannot use this feature"); 
        return 1; 
    } 
    if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot park vehicles in the interiors!"); 
    if(VehicleInfo[GetPlayerVehicleID(playerid)][buybar] == 1) { 
        SendClientMessage(playerid, COLOR_BRIGHTRED, "This vehicle is un-buyable and these features will not work!"); 
        return 1; 
    } 
    if((PlayerInfo[playerid][vowner] == 0) && (PlayerInfo[playerid][vowner2] == 0) && (PlayerInfo[playerid][vowner3] == 0) && (PlayerInfo[playerid][vowner4] == 0) && (PlayerInfo[playerid][vowner5] == 0) && (PlayerInfo[playerid][vowner6] == 0)) { 
            if((PlayerInfo[playerid][vowner7] == 0) && (PlayerInfo[playerid][vowner8] == 0)) { 
            SendClientMessage(playerid, COLOR_BRIGHTRED, "You must first own a vehicle before you can use this feature!"); 
            return 1; 
        } 
    } 
//    if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You need $10000 to park your car!"); 
    if(IsPlayerInAnyVehicle(playerid)) { 
        if (strcmp(VehicleInfo[GetPlayerVehicleID(playerid)][owner],PlayerInfo[playerid][name],false) == 0) { 
            new Float:spx,Float:spy,Float:spz; 
            new Float:spa; 
    //        GivePlayerMoney(playerid,-10000); 
            GetVehiclePos(GetPlayerVehicleID(playerid),spx,spy,spz); 
            GetVehicleZAngle(GetPlayerVehicleID(playerid),spa); 
            VehicleInfo[GetPlayerVehicleID(playerid)][x_spawn] = spx; 
            VehicleInfo[GetPlayerVehicleID(playerid)][y_spawn] = spy; 
            VehicleInfo[GetPlayerVehicleID(playerid)][z_spawn] = spz; 
            VehicleInfo[GetPlayerVehicleID(playerid)][za_spawn] = spa; 
            format(securemess,sizeof(securemess),"You have just parked your %s at your current location... it will respawn here in future!", VehicleInfo[GetPlayerVehicleID(playerid)][name]); 
            SendClientMessage(playerid, COLOR_GREEN, securemess); 
            return 1; 
        } 
        else { 
            SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not own this vehicle and cannot park it!"); 
            return 1; 
        } 
    } 
    else { 
        SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be in a vehicle to use this feature"); 
        return 1; 
    } 
}
This should work I think
Reply
#12

Quote:
Originally Posted by kalanerik99
View Post
Code:
stock park(playerid) 
{ 
    if(VehicleInfo[GetPlayerVehicleID(playerid)][Temp] == 1) { 
        return SendClientMessage(playerid, COLOR_ORANGE, "This vehicle is only temporary and some commands may not work!"); 
    } 
    if(PlayerInfo[playerid][LoggedIn] == 0) { 
        SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use this feature"); 
        return 1; 
    } 
    if(PlayerInfo[playerid][Jailed] == 1) { 
        SendClientMessage(playerid, COLOR_BRIGHTRED, "You are in jail and cannot use this feature"); 
        return 1; 
    } 
    if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot park vehicles in the interiors!"); 
    if(VehicleInfo[GetPlayerVehicleID(playerid)][buybar] == 1) { 
        SendClientMessage(playerid, COLOR_BRIGHTRED, "This vehicle is un-buyable and these features will not work!"); 
        return 1; 
    } 
    if((PlayerInfo[playerid][vowner] == 0) && (PlayerInfo[playerid][vowner2] == 0) && (PlayerInfo[playerid][vowner3] == 0) && (PlayerInfo[playerid][vowner4] == 0) && (PlayerInfo[playerid][vowner5] == 0) && (PlayerInfo[playerid][vowner6] == 0)) { 
            if((PlayerInfo[playerid][vowner7] == 0) && (PlayerInfo[playerid][vowner8] == 0)) { 
            SendClientMessage(playerid, COLOR_BRIGHTRED, "You must first own a vehicle before you can use this feature!"); 
            return 1; 
        } 
    } 
//    if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You need $10000 to park your car!"); 
    if(IsPlayerInAnyVehicle(playerid)) { 
        if (strcmp(VehicleInfo[GetPlayerVehicleID(playerid)][owner],PlayerInfo[playerid][name],false) == 0) { 
            new Float:spx,Float:spy,Float:spz; 
            new Float:spa; 
    //        GivePlayerMoney(playerid,-10000); 
            GetVehiclePos(GetPlayerVehicleID(playerid),spx,spy,spz); 
            GetVehicleZAngle(GetPlayerVehicleID(playerid),spa); 
            VehicleInfo[GetPlayerVehicleID(playerid)][x_spawn] = spx; 
            VehicleInfo[GetPlayerVehicleID(playerid)][y_spawn] = spy; 
            VehicleInfo[GetPlayerVehicleID(playerid)][z_spawn] = spz; 
            VehicleInfo[GetPlayerVehicleID(playerid)][za_spawn] = spa; 
            format(securemess,sizeof(securemess),"You have just parked your %s at your current location... it will respawn here in future!", VehicleInfo[GetPlayerVehicleID(playerid)][name]); 
            SendClientMessage(playerid, COLOR_GREEN, securemess); 
            return 1; 
        } 
        else { 
            SendClientMessage(playerid, COLOR_BRIGHTRED, "You do not own this vehicle and cannot park it!"); 
            return 1; 
        } 
    } 
    else { 
        SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be in a vehicle to use this feature"); 
        return 1; 
    } 
}
This should work I think
this work thank you .... but i need to know ids cars already parked in interiors.. for fix laaag pleas help me
Reply
#13

I don\'t see how cars in an interior lag you. What happens when you "lag"?
Reply
#14

Quote:
Originally Posted by Arthur Kane
View Post
I don\'t see how cars in an interior lag you. What happens when you "lag"?
all players can\'t go to interiors because very lag .. if i respawn cars ..interior fast 5 sec and back laag again... cars is invisible in interiors
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)