19.05.2016, 04:33
Take a look at this:
https://sampwiki.blast.hk/wiki/GameTextStyle
Type 1 fades out after 8 seconds regardless of time set. Look into using textdraws instead, or chose a different style that you can control the time of.
Also, to help you out on your cases cause it seems like you repeat a lot of code, you can do this to have a more efficent code:
https://sampwiki.blast.hk/wiki/GameTextStyle
Type 1 fades out after 8 seconds regardless of time set. Look into using textdraws instead, or chose a different style that you can control the time of.
Also, to help you out on your cases cause it seems like you repeat a lot of code, you can do this to have a more efficent code:
pawn Код:
forward SetPlayerTeamFromClass(playerid, classid);
public SetPlayerTeamFromClass(playerid, classid)
{
switch(classid)
{
case 0 .. 5: // classid 0-5
{
gTeam[playerid] = BALLAS;
GameTextForPlayer(playerid,"~p~ Ballas Familia",1000,1);
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,BCOL);
}
case 6 .. 11: // classid 6-11
{
gTeam[playerid] = GROVES;
GameTextForPlayer(playerid,"~g~Grove Street Familia",1000,1);
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,GCOL);
}
case 12 .. 17: // classid 12-17
{
gTeam[playerid] = POLICE;
GameTextForPlayer(playerid,"~b~Los Santos Police (L.S.P)",1000,1);
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,PCOL);
}
}
return 1;
}