OnPlayerRequestClass Error
#1

I get an error that says: error 010: invalid function or declaration





Код:
public OnPlayerRequestClass(playerid, classid)
if(classid == 0)
    {
        gTeam[playerid] = TEAM_rollin60;
        GameTextForPlayer(playerid,"~w~Ballas",3000,5);
        SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779);
        SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); 
        SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
        SetPlayerFacingAngle(playerid,122.4500);
        SetPlayerColor(playerid,0xA000FFFF);
    }
else if(classid == 1)
    {
        gTeam[playerid] = TEAM_rollin60;
        GameTextForPlayer(playerid,"~w~Grove Street Famlilys",3000,5);
        SetPlayerPos(playerid,2500.6060,-1672.1453,13.3512);
        SetPlayerCameraPos(playerid,2507.0615,-1674.3574,13.3732);
        SetPlayerCameraLookAt(playerid,2500.6060,-1672.1453,13.3512);
        SetPlayerFacingAngle(playerid,252.4717);
        SetPlayerColor(playerid,0x55FF00FF);

        }
        return 1;
        }
Reply
#2

You forgot to open the bracket { after OnPlayerRequestClass
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(classid == 0)
    {
        gTeam[playerid] = TEAM_rollin60;
        GameTextForPlayer(playerid,"~w~Ballas",3000,5);
        SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779);
        SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909);
        SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
        SetPlayerFacingAngle(playerid,122.4500);
        SetPlayerColor(playerid,0xA000FFFF);
    }
    else if(classid == 1)
    {
        gTeam[playerid] = TEAM_rollin60;
        GameTextForPlayer(playerid,"~w~Grove Street Famlilys",3000,5);
        SetPlayerPos(playerid,2500.6060,-1672.1453,13.3512);
        SetPlayerCameraPos(playerid,2507.0615,-1674.3574,13.3732);
        SetPlayerCameraLookAt(playerid,2500.6060,-1672.1453,13.3512);
        SetPlayerFacingAngle(playerid,252.4717);
        SetPlayerColor(playerid,0x55FF00FF);
       
    }
    return 1;
}
Reply
#3

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{ // you missed this bracket
    if(classid == 0)
    {
        gTeam[playerid] = TEAM_rollin60;
        GameTextForPlayer(playerid,"~w~Ballas",3000,5);
        SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779);
        SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909);
        SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
        SetPlayerFacingAngle(playerid,122.4500);
        SetPlayerColor(playerid,0xA000FFFF);
    }
    else if(classid == 1)
    {
        gTeam[playerid] = TEAM_rollin60;
        GameTextForPlayer(playerid,"~w~Grove Street Famlilys",3000,5);
        SetPlayerPos(playerid,2500.6060,-1672.1453,13.3512);
        SetPlayerCameraPos(playerid,2507.0615,-1674.3574,13.3732);
        SetPlayerCameraLookAt(playerid,2500.6060,-1672.1453,13.3512);
        SetPlayerFacingAngle(playerid,252.4717);
        SetPlayerColor(playerid,0x55FF00FF);

    }
    return 1;
}
// Meh - Konstantinos was faster.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)