Help with this code
#1

I tried to make this code, but when i added , it got some error
PHP код:
CMD:datbanhlenxe(playeridparams[])
{
    if(
PlayerInfo[playerid][pRFLTeam] != 0)
    {
        
SendClientMessageEx(playerid,COLOR_GREY," Ban chua nau banh pizza !");
    }
    else
    {
        new 
closestcar GetClosestCar(playerid);
        if(
IsPlayerInRangeOfVehicle(playeridclosestcar10.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;

At this line i want if the player have
Код HTML:
PlayerInfo[playerid][pRFLTeam] = 1;
, he will get
Код HTML:
PlayerInfo[playerid][pFallIntoFun] = 1;
PHP код:
    if
            {
                
PlayerInfo[playerid][pRFLTeam] = 1;
                {
                
PlayerInfo[playerid][pFallIntoFun] = 1;
                }
            }
        }
    }
    return 
1
Can someone help me
Reply
#2

pawn Код:
if(PlayerInfo[playerid][pRFLTeam] == 1)
{
    PlayerInfo[playerid][pFallIntoFun] = 1;
}
You should consider practicing basic programming, because by looking at your recent help topics I realized you have no idea what coding style is and now I see that you don't know how to write a proper IF-statement. Take it as a piece of advice, you can do whatever you want though.
Reply
#3

Quote:
Originally Posted by HazardouS
Посмотреть сообщение
pawn Код:
if(PlayerInfo[playerid][pRFLTeam] == 1)
{
    PlayerInfo[playerid][pFallIntoFun] = 1;
}
You should consider practicing basic programming, because by looking at your recent help topics I realized you have no idea what coding style is and now I see that you don't know how to write a proper IF-statement. Take it as a piece of advice, you can do whatever you want though.
First of all, i've just start doing samp for 3monhts, and i try to do this code -.- , i'm still a bad coder
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)