Help with strange bug of classid
#1

Hi boyz i have do this:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerWeather(playerid,91);
    TextDrawShowForPlayer(playerid,selezione1);
    TextDrawShowForPlayer(playerid,selezione2);
   
    if(classid >= 0 && classid <= 2)
    {
        SetPlayerPos(playerid, 1831.9000244141,-1284.1999511719,98.5);
        SetPlayerFacingAngle(playerid,-25.0);
        SetPlayerCameraPos(playerid, 1831.8469238281, -1281.4437255859, 98.5);
        SetPlayerCameraLookAt(playerid, 1832.9000244141, -1284.1999511719, 98.5);
        SetPlayerTeam(playerid,TEAM_LOCOS_CREW);
        SetPlayerColor(playerid,0x808080AA);

        TextDrawSetString(selezione1,"THE LOCOS CREW");
        TextDrawSetString(selezione2,"Team of owners of the server");
    }

    if(classid >= 3 && classid <= 40)
    {
        SetPlayerPos(playerid, 1831.9000244141,-1284.1999511719,98.5);
        SetPlayerFacingAngle(playerid,-25.0);
        SetPlayerCameraPos(playerid, 1831.8469238281, -1281.4437255859, 98.5);
        SetPlayerCameraLookAt(playerid, 1832.9000244141, -1284.1999511719, 98.5);
        SetPlayerColor(playerid,0xF4A460AA);
        new stringa[34];
        format(stringa,sizeof(stringa),"TEAM_CIVILIANS");
        pinfo[playerid][team] = stringa;
        TextDrawSetString(selezione1,"CIVILIANS TEAM");
        TextDrawSetString(selezione2,"Team of civilians");
    }

    if(classid >= 41 && classid <= 44)
    {
        SetPlayerPos(playerid, 1831.9000244141,-1284.1999511719,98.5);
        SetPlayerFacingAngle(playerid,-25.0);
        SetPlayerCameraPos(playerid, 1831.8469238281, -1281.4437255859, 98.5);
        SetPlayerCameraLookAt(playerid, 1832.9000244141, -1284.1999511719, 98.5);
        SetPlayerTeam(playerid,TEAM_GUARDIANS);
        SetPlayerColor(playerid,0xA52A2AAA);

        TextDrawSetString(selezione1,"GUARDIANS TEAM");
        TextDrawSetString(selezione2,"The guardians is a special class that is concerned with protecting the goods of the earth, and then the city where they are located. They have a heroic ethical and patriotic spirit. This class allows you to 'arrest' any thug who kills, or carries out criminal actions towards other players. ");
    }
    return 1;
}
now see this ??

pawn Код:
if(classid >= 3 && classid <= 40)
    {
        SetPlayerPos(playerid, 1831.9000244141,-1284.1999511719,98.5);
        SetPlayerFacingAngle(playerid,-25.0);
        SetPlayerCameraPos(playerid, 1831.8469238281, -1281.4437255859, 98.5);
        SetPlayerCameraLookAt(playerid, 1832.9000244141, -1284.1999511719, 98.5);
        SetPlayerColor(playerid,0xF4A460AA);
        new stringa[34];
        format(stringa,sizeof(stringa),"TEAM_CIVILIANS");
        pinfo[playerid][team] = stringa;
        TextDrawSetString(selezione1,"CIVILIANS TEAM");
        TextDrawSetString(selezione2,"Team of civilians");
    }
Ok i haven't Set a function SetPlayerTeam(), cuz i want that who choise this classid, when shot at other of this same class, he can do damage. But isn't it. When i spawn with this class and my ID is 0 who shot me and he is in the same class don't do Damage on my healt/armour, but if i shot to he, i can kill him. Why?!?!?!?!
Reply
#2

Bump*

I think that my problems reguard that i declare one team before of the class Civilians...
Reply
#3

don't know solutions ?
Reply
#4

Try setting the teams on spawn
Reply
#5

yeah but my question is that i haven't setted a team for class civilians, but if one shot me don't give damage..
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)