What is wrong
#4

pawn Код:
if (strcmp(cmdtext, "/unlock", true)==0)
{
    if(PlayerInfo[playerid][pDonateRank] >= 2)
    {
        print("Car unlocked");
        if(IsPlayerInAnyVehicle(playerid))
        {
            new State=GetPlayerState(playerid);
            if(State!=PLAYER_STATE_DRIVER)
            {
                SendClientMessage(playerid,0xFFFF00AA,"You must be an driver to do this.");
                return 1;
            }
            new i;
            for(i=0;i<MAX_PLAYERS;i++)
            {
                SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
            }
            SendClientMessage(playerid, 0xFFFF00AA, "Car unlocked.");
            new Float:pX, Float:pY, Float:pZ;
            GetPlayerPos(playerid,pX,pY,pZ);
            PlayerPlaySound(playerid,1057,pX,pY,pZ);
        }
        else
        {
            SendClientMessage(playerid, 0xFFFF00AA, "You don't have an car.");
        }
        return 1;
    }
}
pawn Код:
if (strcmp(cmdtext, "/lock", true)==0)
{
    if(PlayerInfo[playerid][pDonateRank] >= 2)
    {
        print("Car locked");
        if(IsPlayerInAnyVehicle(playerid))
        {
            new State=GetPlayerState(playerid);
            if(State!=PLAYER_STATE_DRIVER)
            {
                SendClientMessage(playerid,0xFFFF00AA,"You must be an driver to do this.");
                return 1;
            }
            new i;
            for(i=0;i<MAX_PLAYERS;i++)
            {
                if(i != playerid)
                {
                    SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
                }
            }
            SendClientMessage(playerid, 0xFFFF00AA, "Car locked!");
            new Float:pX, Float:pY, Float:pZ;
            GetPlayerPos(playerid,pX,pY,pZ);
            PlayerPlaySound(playerid,1056,pX,pY,pZ);
        }
        else
        {
            SendClientMessage(playerid, 0xFFFF00AA, "You don't have an car.");
        }
            return 1;
    }
}
Two times the same error (one bracket missing)

Quote:
Originally Posted by Passout
Посмотреть сообщение
Ye,there is no way we can help without the errors or the problem you are experiencing
26 errors is bracket missing
Reply


Messages In This Thread
What is wrong - by boyan96 - 01.05.2012, 18:39
Re: What is wrong - by Sphex - 01.05.2012, 18:42
Re: What is wrong - by Passout - 01.05.2012, 18:44
Re : What is wrong - by Shidony - 01.05.2012, 18:46

Forum Jump:


Users browsing this thread: 2 Guest(s)