SA-MP Forums Archive
Help with this code - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with this code (/showthread.php?tid=562187)



Help with this code - LuisPark - 07.02.2015

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


Re: Help with this code - HazardouS - 07.02.2015

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.


Re: Help with this code - LuisPark - 07.02.2015

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