07.02.2015, 14:23
I was add 2 codes in my gm, but it may something went wrong
Code 1 :
Code 2 :
the code 1 i made to set player pRFLTeam = 1, so that player can use the next cmd(/duabanhlenxe), but when i type , it always told me didnt have a pice ( it mean pRFLTeam = 0)
Could sbdy help and edit for me please
Code 1 :
PHP код:
CMD:naubanhpizza(playerid, params[])
{
if (!IsPlayerInRangeOfPoint(playerid, 3.0, 375.5077, -118.8028, 1001.4995)) return SendClientMessage(playerid, COLOR_GREY, "Toan bo khu mua bao hiem da bi khoa, hay ra sfvip de mua baohiem.");
{
SendClientMessage(playerid, COLOR_GREEN,"Ban da che tao banh pizza.");
PlayerInfo[playerid][pRFLTeam]= 1;
return 1;
}
}
PHP код:
CMD:datbanhlenxe(playerid, params[])
{
if(PlayerInfo[playerid][pRFLTeam] != 0)
{
SendClientMessageEx(playerid,COLOR_GREY," Ban chua nau banh pizza !");
}
else
{
new closestcar = GetClosestCar(playerid);
if(IsPlayerInRangeOfVehicle(playerid, closestcar, 10.0))
{
if(!IsABike(closestcar))
{
SendClientMessageEx(playerid,COLOR_GREY," Ban khong gan mot chiec xe nao do !");
}
if(PlayerInfo[playerid][pRFLTeam] == 1)
{
PlayerInfo[playerid][pFallIntoFun] = 1;
}
}
}
return 1;
}
Could sbdy help and edit for me please