GTAOnline.net
San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Lucifer le 14 Juin 2010, 01:10:13
-
Je crois avoir compris ;)
J'ai essayé, j'ai un soucis, pour pas que sa face trop long, j'aimerais que mes Create3DTextLabel soient pas sur la même ligne, un l'en dessous de l'autre.
Voici comme çà fait en image :
(http://img7.hostingpics.net/pics/106726sa_mp_021.png)
Voici le code :
{
format(string, sizeof(string), "Maison de %s / Niveau: %d",HouseInfo[h][hOwner],HouseInfo[h][hLevel]);
housesale = Create3DTextLabel(string,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
format(string, sizeof(string), "Tapez /louermaison pour $%d",HouseInfo[h][hValue],HouseInfo[h][hRent]);
//format(string, sizeof(string), "~w~Maison de %s Loyer: $%d Niveau : %d Tapez /louermaison pour louer cette maison",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
housesale = Create3DTextLabel(string,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
CreateDynamicMapIcon(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 31, 1, 0, 0, 0, 100.0);
//format(string, sizeof(string), "~w~Maison de ~n~%s~n~Loyer: $%d Niveau : %d~n~Tapez /louermaison to rent a room",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
}
Comment faire pour pas qu'ils soient superposé ?
-
Augmente ou baisse la position Z d'un des deux 3DTextLabel
-
housesale = Create3DTextLabel(string,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez][color=red]+1[/color],15,0,1);
J'augmente ce qui est en rouge ??
-
Oui exactement :) met enleve la balise de couleur du forum ^^
-
Utilise ceci se sera mieux.
format(string, sizeof(string), "Maison de %s / Niveau: %d\nTapez /louermaison pour $%d",HouseInfo[h][hOwner],HouseInfo[h][hLevel],HouseInfo[h][hValue],HouseInfo[h][hRent]);
housesale = Create3DTextLabel(string,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
-
Ok, donc au lieu de mettre " +1 ", je met " +5 " par exemple ?
Double post
Ah oui, Ok ^^
Merci Scott
Double post
Sa marche mais le seul soucis, c'est que sa affiche le Create3DText plus un texte au milieu de l'écran (Voir image sur le précédent post), comment faire pour enlever le texte en marron ?
Merci ;)
-
Supprime le GameTextForPlayer.
-
J'aimerais savoir quelques trucs sur les Create3DTextLabel au niveau des bizzs et maisons.
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hOwned] == 0)
{
format(string, sizeof(string), "Maison à vendre\nPrix: $%d",HouseInfo[h][hValue]);
housesale = Create3DTextLabel(string1,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
//AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
pickups++;
}
if(HouseInfo[h][hOwned] == 1)
{
format(string, sizeof(string), "Propriétaire: %s \nLoyer : %d$\n Niveau : %d",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
housesale = Create3DTextLabel(string1,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
AddStaticPickup(1239, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
//DestroyDynamicMapIcon(31);
pickups++;
}
}
Peut-on me dire si ce codes est juste ? Car dans le jeu, le prix s'affiche pas " Maison à vendre - Prix : IL Y A RIEN "..
Merci de votre aide
-
format(string, sizeof(string), "Maison à vendre\nPrix: $%d",HouseInfo[h][hValue]);
housesale = Create3DTextLabel(string1,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
Regarde tes string, il y a une difference.
-
Ok sa marche sauf soucis...sa affiche pas le prix :
format(string1, sizeof(string), "Maison à vendre\nPrix: $%d",HouseInfo[h][hValue]);
Bizarre...