21.04.2014, 02:47
The title says,
what's the wrong with this code, let me explain, ok i /setdonator myself and after i go to the VIP Car and i type /vipcar exit then after i goto the TP place it sets me to None Donator Level, the /vip exit too,, Here's the code
/vip exit
Please help me i need this very fast !
what's the wrong with this code, let me explain, ok i /setdonator myself and after i go to the VIP Car and i type /vipcar exit then after i goto the TP place it sets me to None Donator Level, the /vip exit too,, Here's the code
pawn Код:
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;
}
pawn Код:
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;
}