kick a player of vehiclemod shop
#1

Is there any function to kick a player of vehiclemod shop?

For the problem that when a player leaves the server stays inside the shop.

Or the only way is keeping a different position? (Near the entrance of the shop perhaps)
Reply
#2

You want to block all vehicle mod shops or what?
Reply
#3

no. Just if a player leaves server inside vehiclemod shop, kick him of there BEFORE save data.
Reply
#4

Where are you saving data? Under OnPlayerDisconnect?
Reply
#5

yeah
Reply
#6

Код:
new IsPlayerInModShop[MAX_PLAYERS];
this should be under OnPlayerConnect
// IsPlayerInModShop[playerid] = 0;
public OnEnterExitModShop(playerid, enterexit, interiorid)
{
    if(enterexit == 0) // If enterexit is 0, this means they are exiting
    {
      IsPlayerInModShop[playerid]  = 0;
    }
else
{
 IsPlayerInModShop[playerid] = 1; 
}
    return 1;
}

Then we will go Under OnPlayerDisconnect where you saving data.
before saving data add condition

if( IsPlayerInModShop[playerid] == 0)//when ==1 it mean he is mod shop
{

//here your saving data
}
Test it i didn't tested.
Reply
#7

I already know that. But I can't stop save data just because the player is inside the shop. I want to save data and if player is inside the shop, the coordinates data not be of interior the vehiclemod shop. (without having to do all the work to detect in which vehiclemod shop the player is entering)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)