CMD:vipcar(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 13.0, -4428.9282, 905.3157, 987.0435))
{
if(PlayerInfo[playerid][pDonator] >= 0)
{
if(isnull(params))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /vipcar [location]");
SendClientMessageEx(playerid, COLOR_GRAD1, "Locations: EXIT");
return 1;
}
if(strcmp(params,"EXIT",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1421.5347,-1677.0745,13.5469);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have been tp'ed with your VIP Car!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pDonator] = 255;
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, " You are not in a vehicle!");
}
}
}
}
return 1;
}
CMD:vip(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 13.0, -4428.9282, 905.3157, 987.0435))
{
if(PlayerInfo[playerid][pDonator] >= 0)
{
if(isnull(params))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /vip [location]");
SendClientMessageEx(playerid, COLOR_GRAD1, "Locations: EXIT");
return 1;
}
if(strcmp(params,"EXIT",true) == 0)
{
SetPlayerPos(playerid, 1421.5347,-1677.0745,13.5469);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have been tp'ed!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pDonator] = 255;
}
}
}
return 1;
}
if(PlayerInfo[playerid][pDonator] >= 0)
PlayerInfo[playerid][pDonator] = 255;
Shouldn't you be running a check to see if they are VIP to use the command?
pawn Код:
And why are you making pDonor a value of 255 here? pawn Код:
|
PlayerInfo[playerid][pDonator] = 255;
I noticed
pawn Код:
|