/accept vehicle wont work At URP
#1

Can anyone help me here i dont know how to fix it... the /sellvehicle works but the /accept vehicle wont..

Thanks..
Lines:

Quote:

else if(strcmp(x_job,"vehicle",true) == 0)
{
new carsellerid = SellVehicleOffer[playerid];
new carsellerslot = SellVehicleSlot[playerid];
new carsellerprice = SellVehiclePrice[playerid];
new Float:X,Float:Y,Float:Z,Float:F;
if(SellVehicleOffer[playerid] != 999)
{
if(PlayerInfo[playerid][pCash] >= carsellerprice)
{
if(IsPlayerConnected(carsellerid))
{
if(ProxDetectorS(10.0, playerid, giveplayerid))
{
if(carsellerslot == 1)
{
GetVehiclePos(PlayerVehicleID1[carsellerid],X,Y,Z);
GetVehicleZAngle(PlayerVehicleID1[carsellerid],F);
if(PlayerInfo[playerid][PlayerVehicleModel1] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 1,1); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,1);
SetVehiclePos(PlayerVehicleID1[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID1[playerid],F);
}
else if(PlayerInfo[playerid][PlayerVehicleModel2] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 1,2); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,2);
SetVehiclePos(PlayerVehicleID2[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID2[playerid],F);
}
else
{
if(PlayerInfo[playerid][pDonateRank] >= 1)
{
if(PlayerInfo[playerid][PlayerVehicleModel3] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 1,3); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,3);
SetVehiclePos(PlayerVehicleID3[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID3[playerid],F);
}
else if(PlayerInfo[playerid][pDonateRank] >= 2)
{
if(PlayerInfo[playerid][PlayerVehicleModel4] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 1,4); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,4);
SetVehiclePos(PlayerVehicleID4[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID4[playerid],F);
}
else if(PlayerInfo[playerid][pDonateRank] >= 3)
{
if(PlayerInfo[playerid][PlayerVehicleModel5] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel1]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 1,5); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,5);
SetVehiclePos(PlayerVehicleID5[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID5[playerid],F);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
}
else if(carsellerslot == 2)
{
GetVehiclePos(PlayerVehicleID2[carsellerid],X,Y,Z);
GetVehicleZAngle(PlayerVehicleID2[carsellerid],F);
if(PlayerInfo[playerid][PlayerVehicleModel1] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel2]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel2]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 2,1); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,1);
SetVehiclePos(PlayerVehicleID1[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID1[playerid],F);
}
else if(PlayerInfo[playerid][PlayerVehicleModel2] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel2]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel2]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 2,2); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,2);
SetVehiclePos(PlayerVehicleID2[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID2[playerid],F);
}
else
{
if(PlayerInfo[playerid][pDonateRank] >= 1)
{
if(PlayerInfo[playerid][PlayerVehicleModel3] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel2]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel2]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 2,3); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,3);
SetVehiclePos(PlayerVehicleID3[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID3[playerid],F);
}
else if(PlayerInfo[playerid][pDonateRank] >= 2)
{
if(PlayerInfo[playerid][PlayerVehicleModel4] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel2]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel2]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 2,4); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,4);
SetVehiclePos(PlayerVehicleID4[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID4[playerid],F);
}
else if(PlayerInfo[playerid][pDonateRank] >= 3)
{
if(PlayerInfo[playerid][PlayerVehicleModel5] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel2]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel2]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 2,5); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,5);
SetVehiclePos(PlayerVehicleID5[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID5[playerid],F);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
}
else if(carsellerslot == 3)
{
GetVehiclePos(PlayerVehicleID3[carsellerid],X,Y,Z);
GetVehicleZAngle(PlayerVehicleID3[carsellerid],F);
if(PlayerInfo[playerid][PlayerVehicleModel1] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel3]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel3]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 3,1); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,1);
SetVehiclePos(PlayerVehicleID1[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID1[playerid],F);
}
else if(PlayerInfo[playerid][PlayerVehicleModel2] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel3]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel3]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 3,2); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,2);
SetVehiclePos(PlayerVehicleID2[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID2[playerid],F);
}
else
{
if(PlayerInfo[playerid][pDonateRank] >= 1)
{
if(PlayerInfo[playerid][PlayerVehicleModel3] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel3]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel3]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 3,3); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,3);
SetVehiclePos(PlayerVehicleID3[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID3[playerid],F);
}
else if(PlayerInfo[playerid][pDonateRank] >= 2)
{
if(PlayerInfo[playerid][PlayerVehicleModel4] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel3]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel3]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 3,4); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,4);
SetVehiclePos(PlayerVehicleID4[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID4[playerid],F);
}
else if(PlayerInfo[playerid][pDonateRank] >= 3)
{
if(PlayerInfo[playerid][PlayerVehicleModel5] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel3]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel3]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 3,5); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,5);
SetVehiclePos(PlayerVehicleID5[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID5[playerid],F);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
}
else if(carsellerslot == 4)
{
GetVehiclePos(PlayerVehicleID4[carsellerid],X,Y,Z);
GetVehicleZAngle(PlayerVehicleID4[carsellerid],F);
if(PlayerInfo[playerid][PlayerVehicleModel1] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel4]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel4]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 4,1); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,1);
SetVehiclePos(PlayerVehicleID1[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID1[playerid],F);
}
else if(PlayerInfo[playerid][PlayerVehicleModel2] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel4]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel4]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 4,2); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,2);
SetVehiclePos(PlayerVehicleID2[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID2[playerid],F);
}
else
{
if(PlayerInfo[playerid][pDonateRank] >= 1)
{
if(PlayerInfo[playerid][PlayerVehicleModel3] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel4]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel4]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 4,3); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,3);
SetVehiclePos(PlayerVehicleID3[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID3[playerid],F);
}
else if(PlayerInfo[playerid][pDonateRank] >= 2)
{
if(PlayerInfo[playerid][PlayerVehicleModel4] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel4]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel4]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 4,4); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,4);
SetVehiclePos(PlayerVehicleID4[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID4[playerid],F);
}
else if(PlayerInfo[playerid][pDonateRank] >= 3)
{
if(PlayerInfo[playerid][PlayerVehicleModel5] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel4]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel4]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 4,5); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,5);
SetVehiclePos(PlayerVehicleID5[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID5[playerid],F);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
}
else if(carsellerslot == 5)
{
GetVehiclePos(PlayerVehicleID5[carsellerid],X,Y,Z);
GetVehicleZAngle(PlayerVehicleID5[carsellerid],F);
if(PlayerInfo[playerid][PlayerVehicleModel1] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel5]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel5]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 5,1); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,1);
SetVehiclePos(PlayerVehicleID1[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID1[playerid],F);
}
else if(PlayerInfo[playerid][PlayerVehicleModel2] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel5]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel5]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 5,2); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,2);
SetVehiclePos(PlayerVehicleID2[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID2[playerid],F);
}
else
{
if(PlayerInfo[playerid][pDonateRank] >= 1)
{
if(PlayerInfo[playerid][PlayerVehicleModel3] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel5]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel5]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 5,3); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,3);
SetVehiclePos(PlayerVehicleID3[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID3[playerid],F);
}
else if(PlayerInfo[playerid][pDonateRank] >= 2)
{
if(PlayerInfo[playerid][PlayerVehicleModel4] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel5]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel5]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 5,4); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,4);
SetVehiclePos(PlayerVehicleID4[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID4[playerid],F);
}
else if(PlayerInfo[playerid][pDonateRank] >= 3)
{
if(PlayerInfo[playerid][PlayerVehicleModel5] == 0)
{
PlayerInfo[playerid][pCash] -= carsellerprice;
GivePlayerMoney(playerid,-carsellerprice);
format(string,sizeof(string)," You have accepted to buy %s's %s For Price : %d.",PlayerName(carsellerid),vehName[PlayerInfo[carsellerid][PlayerVehicleModel5]-400],carsellerprice);
SendClientMessage(playerid,COLOR_YELLOW,string);
format(string,sizeof(string)," You have sold your %s to %s For Price : %s.",vehName[PlayerInfo[carsellerid][PlayerVehicleModel5]-400],PlayerName(playerid),carsellerprice);
SendClientMessage(carsellerid,COLOR_YELLOW,string) ;
ReplacePlayerVehicle(carsellerid, playerid, 5,5); // ReplacePlayerVehicle(seller, buyer, sellerslotid,buyerslotid)
RemovePlayerFromVehicle(carsellerid);
ResetPlayerVehicle(carsellerid,carsellerslot);
CreatePlayerVehicle(playerid,5);
SetVehiclePos(PlayerVehicleID5[playerid],X,Y,Z);
SetVehicleZAngle(PlayerVehicleID5[playerid],F);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You have the maximum car limit!");
}
}
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You can't afford that !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Nobody offered you to sell his vehicle !");
return 1;
}
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)