kick a player of vehiclemod shop - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: kick a player of vehiclemod shop (
/showthread.php?tid=607196)
kick a player of vehiclemod shop -
aoEXE - 16.05.2016
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)
Re: kick a player of vehiclemod shop -
MBilal - 16.05.2016
You want to block all vehicle mod shops or what?
Respuesta: kick a player of vehiclemod shop -
aoEXE - 16.05.2016
no. Just if a player leaves server inside vehiclemod shop, kick him of there BEFORE save data.
Re: kick a player of vehiclemod shop -
MBilal - 16.05.2016
Where are you saving data? Under OnPlayerDisconnect?
Respuesta: kick a player of vehiclemod shop -
aoEXE - 16.05.2016
yeah
Re: kick a player of vehiclemod shop -
MBilal - 16.05.2016
Код:
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.
Respuesta: kick a player of vehiclemod shop -
aoEXE - 16.05.2016
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)