Help How to create entrance for only vip
#7

Quote:
Originally Posted by GTLS
Посмотреть сообщение
Add a Pickup or a CP at Enter and Exit points. in OnPlayerPickupPickup or OnPlayerEnterCheckpoint, put a condition,
PHP код:
 if(PlayerInfo[playerid][pVIP] >= 1)
{
     
SetPlayerPos(playeridX,Y,Z);
}
else

   
SendClientMessage(playerid, -1"You are not VIP.");

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(pickupid == VIP_Enter// for Pickup
{
     if(
PlayerInfo[playerid][pVIP] >= 1)
{
     
SetPlayerPos(playeridX,Y,Z);
}
else

   
SendClientMessage(playerid, -1"You are not VIP.");
}

Quote:
Originally Posted by iLearner
Посмотреть сообщение
Create a pickup / cp, assign its Id to a variable and on onplayerpickuppickup / onplayerentercheckpoint check if the entered pickup / cp is VIP entrance, if so check if player is VIP, if yes set his pos to where ever you want otherwise no reactions
Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
This is obviously something you're trying to do, but this is surely in the wrong place.

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
AddStaticPickup(19607, 2, 1506.3359, 1432.3585, 10.1191, 0);
return 1;
}
Also from your code, you have a OnPlayerEnterCheckpoint, and a OnPlayerPickupPickup, yet nowhere in the script did you actually make those checkpoints/pickups.

And what pickup you create, is created when someone picks up a pickup, so thus, it'll never turn up.
Yes, I Know I Delete This One,

AddStaticPickup(19607, 2, 1506.3359, 1432.3585, 10.1191, 0);
return 1;

And I Put New One What GTLS Told Me,

Thanks
Reply


Messages In This Thread
Help How to create entrance for only vip - by Ayyash - 28.02.2017, 08:02
Re: Help How to create entrance for only vip - by iLearner - 28.02.2017, 08:23
Re: Help How to create entrance for only vip - by Ayyash - 28.02.2017, 10:24
Re: Help How to create entrance for only vip - by GTLS - 28.02.2017, 10:26
Re: Help How to create entrance for only vip - by Ayyash - 02.03.2017, 12:52
Re: Help How to create entrance for only vip - by Sew_Sumi - 02.03.2017, 14:51
Re: Help How to create entrance for only vip - by Ayyash - 02.03.2017, 15:53
Re: Help How to create entrance for only vip - by Sew_Sumi - 02.03.2017, 16:50
Re: Help How to create entrance for only vip - by GTLS - 04.03.2017, 15:37
Re: Help How to create entrance for only vip - by Sew_Sumi - 04.03.2017, 16:49

Forum Jump:


Users browsing this thread: 2 Guest(s)