28.02.2017, 10:26
Add a Pickup or a CP at Enter and Exit points. in OnPlayerPickupPickup or OnPlayerEnterCheckpoint, put a condition,
Above Code is an Example that you can use. replace all variables with your own according to your script.
EDIT: after seeing your code i think its wrong. Put CP or Pickup under OnGameModeInit(), then on OnPlayerPickupPickup or OnPlayerEnterCheckpoint, using a Variable check if player is in VIP entrance or at some other place, like
PHP код:
if(PlayerInfo[playerid][pVIP] >= 1)
{
SetPlayerPos(playerid, X,Y,Z);
}
else
{
SendClientMessage(playerid, -1, "You are not VIP.");
}
EDIT: after seeing your code i think its wrong. Put CP or Pickup under OnGameModeInit(), then on OnPlayerPickupPickup or OnPlayerEnterCheckpoint, using a Variable check if player is in VIP entrance or at some other place, like
PHP код:
if(pickupid == VIP_Enter) // for Pickup
{
if(PlayerInfo[playerid][pVIP] >= 1)
{
SetPlayerPos(playerid, X,Y,Z);
}
else
{
SendClientMessage(playerid, -1, "You are not VIP.");
}
}