30.03.2011, 19:45
Well the instructor gives /givelicense and when i try to /accept license it says i already have it (though at /licenses it doesnt show)
this is the license part,everything looks fine
its from raven's roleplay,the one bugged as hell ....and dont tell me to post there,i tried,nobody answers that topic
p.s: the code doesnt end there it goes on with offers for sex & etc ,thats the license part only ,if i dont fix that ill have to delete the entire faction cause its useless ....
this is the license part,everything looks fine
pawn Код:
if(LicenseType[playerid] == 0 || LicenseType[playerid] > 5)
{
return 1;
}
if(IsPlayerConnected(LicenseOffer[playerid]))
{
GetPlayerName(LicenseOffer[playerid], giveplayer, sizeof(giveplayer));
if(LicenseType[playerid] == 1)
{
if(PlayerInfo[playerid][pCarLic] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " You have drivers license already.");
}
else
{
format(string, sizeof(string), "* You bought Drivers License for $%d from Instructor %s.",LicensePrice[playerid],giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s has bought your Drivers License for $%d and it was added to your PayCheck.",sendername,LicensePrice[playerid]);
SendClientMessage(LicenseOffer[playerid], COLOR_WHITE, string);
PlayerInfo[playerid][pCarLic] = 1;
SafeGivePlayerMoney(playerid, -LicensePrice[playerid]);
PlayerInfo[LicenseOffer[playerid]][pPayCheck] += LicensePrice[playerid] * 5;
}
}
if(LicenseType[playerid] == 2)
{
if(PlayerInfo[playerid][pFlyLic] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " You have flying license already.");
}
else
{
format(string, sizeof(string), "* You bought Flying License for $%d from Instructor %s.",LicensePrice[playerid],giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s has bought your Flying License for $%d and it was added to your PayCheck.",sendername,LicensePrice[playerid]);
SendClientMessage(LicenseOffer[playerid], COLOR_WHITE, string);
PlayerInfo[playerid][pFlyLic] = 1;
SafeGivePlayerMoney(playerid, -LicensePrice[playerid]);
PlayerInfo[LicenseOffer[playerid]][pPayCheck] += LicensePrice[playerid] * 5;
}
}
if(LicenseType[playerid] == 3)
{
if(PlayerInfo[playerid][pBoatLic] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " You have Sailing license already.");
}
else
{
format(string, sizeof(string), "* You bought Sailing License for $%d from Instructor %s.",LicensePrice[playerid],giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s has bought your Sailing License for $%d and it was added to your PayCheck.",sendername,LicensePrice[playerid]);
SendClientMessage(LicenseOffer[playerid], COLOR_WHITE, string);
PlayerInfo[playerid][pBoatLic] = 1;
SafeGivePlayerMoney(playerid, -LicensePrice[playerid]);
PlayerInfo[LicenseOffer[playerid]][pPayCheck] += LicensePrice[playerid] * 5;
}
}
if(LicenseType[playerid] == 4)
{
if(PlayerInfo[playerid][pFishLic] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " You have Fishing license already.");
}
else
{
format(string, sizeof(string), "* You bought Fishing License for $%d from Instructor %s.",LicensePrice[playerid],giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s has bought your Fishing License for $%d and it was added to your PayCheck.",sendername,LicensePrice[playerid]);
SendClientMessage(LicenseOffer[playerid], COLOR_WHITE, string);
PlayerInfo[playerid][pFishLic] = 1;
SafeGivePlayerMoney(playerid, -LicensePrice[playerid]);
PlayerInfo[LicenseOffer[playerid]][pPayCheck] += LicensePrice[playerid] * 5;
}
}
if(LicenseType[playerid] == 5)
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " You have Weapon license already.");
}
else
{
format(string, sizeof(string), "* You bought Weapon License for $%d from Instructor %s.",LicensePrice[playerid],giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s has bought your Weapon License for $%d and it was added to your PayCheck.",sendername,LicensePrice[playerid]);
SendClientMessage(LicenseOffer[playerid], COLOR_WHITE, string);
PlayerInfo[playerid][pGunLic] = 1;
SafeGivePlayerMoney(playerid, -LicensePrice[playerid]);
PlayerInfo[LicenseOffer[playerid]][pPayCheck] += LicensePrice[playerid] * 5;
}
}
LicenseOffer[playerid] = 999;
LicensePrice[playerid] = 0;
LicenseType[playerid] = 0;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You can't afford that License !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " No-one offerd you any License !");
return 1;
}
}
its from raven's roleplay,the one bugged as hell ....and dont tell me to post there,i tried,nobody answers that topic
p.s: the code doesnt end there it goes on with offers for sex & etc ,thats the license part only ,if i dont fix that ill have to delete the entire faction cause its useless ....