SA-MP Forums Archive
Text Over The Class!!! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Text Over The Class!!! (/showthread.php?tid=266837)



Text Over The Class!!! - IvancheBG - 06.07.2011

I want to put over the class like i select a member of grove street and ove the class to say Grove Street!How to do that?


Re: Text Over The Class!!! - Toreno - 06.07.2011

pawn Код:
public OnGameModeInit() {
    //Grove Street
    AddPlayerClass(105, 0000.0000, 0000.0000, 00.0000, 00.0000, 0, 0, 0, 0, 0, 0); // Num 0, change X, Y, Z !
    AddPlayerClass(106, 0000.0000, 0000.0000, 00.0000, 00.0000, 0, 0, 0, 0, 0, 0); // Num 1, change X, Y, Z !
    AddPlayerClass(107, 0000.0000, 0000.0000, 00.0000, 00.0000, 0, 0, 0, 0, 0, 0); // Num 2, change X, Y, Z !
    //Ballas
    AddPlayerClass(102, 0000.0000, 0000.0000, 00.0000, 00.0000, 0, 0, 0, 0, 0, 0); // Num 3, change X, Y, Z !
    AddPlayerClass(103, 0000.0000, 0000.0000, 00.0000, 00.0000, 0, 0, 0, 0, 0, 0); // Num 4, change X, Y, Z !
    AddPlayerClass(104, 0000.0000, 0000.0000, 00.0000, 00.0000, 0, 0, 0, 0, 0, 0); // Num 5, change X, Y, Z !
    return 1;
}
Then...
pawn Код:
public OnPlayerRequestClass(playerid, classid) {
    new team[16];
    SetPlayerPos(playerid, 0000.0000, 0000.0000, 00.0000); // Change X, Y, Z !
    SetPlayerFacingAngle(playerid, 000.0000); // Change X, Y, Z !
    SetPlayerCameraPos(playerid, 0000.0000, 0000.0000, 00.0000); // Change X, Y, Z !
    SetPlayerCameraLookAt(playerid, 0000.0000, 0000.0000, 00.0000); // Change X, Y, Z !
    switch(classid) {
        case 0..2: format(team, sizeof(team), "~g~Grove Street"); // 0..2 means the num of AddPlayerClass, look up, also it's 0 - 2 so you don't need to write 1.
        case 3..5: format(team, sizeof(team), "~p~Ballas"); // 3..5 means the num of AddPlayerClass, look up, also it's 3 - 5 so you don't need to write 4.
    }
    GameTextForPlayer(playerid, team, 3500, 4);
    return 1;
}
Enjoy, hope it was helpful.


Re: Text Over The Class!!! - IvancheBG - 06.07.2011

Thank You Very Much