Think about a car shop
#1

Hello,

Actually i'm creating a RP Gamemode, and i'm creating a car selling system, but i want it better than other GM we can find on Servers ( On french servers ^^ ), so i have this : http://prntscr.com/cj0pab

But now, i don't know how to do, to make that the car buyable in datas are showed when we click on the arrow ...
At now, the screen u can see is just a textdraw, nothing else ! No system in it....

The only thing i have, is a enum with all veh datas, and know if the veh is buyable or not.

I don't know how to do this system, like in thinking, not like in code u see ?

Thanks for the help u can provide
Reply
#2

https://sampwiki.blast.hk/wiki/TextDrawSetSelectable
https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw
or if you are using PlayerTextDraw
https://sampwiki.blast.hk/wiki/PlayerTextDrawSetSelectable
https://sampwiki.blast.hk/wiki/OnPlayerClickPlayerTextDraw
Reply
#3

No, i know this, i don't mean this, i mean i want to know, because i still think about this, but i don't solve the problem.

I want when we click on the arrow, it switch of vehicle, but how make that the textdraw switch of vehicle? How put vehicle in the list? How make that when we click on the arrow, we go to the next car ... I don't know how to make it. I know the functions. Idk if i'm explaining well... I'm french so ^^
Reply
#4

I'll give you an example,
PHP код:
//When player click "Next"
new string[30];
format(stringsizeof(string), "%s"GetVehicleName(nextvehicle));
TextDrawSetString(vehiclenamestring);
format(stringsizeof(string), "$ %d"Vehicle[nextvehicle][Price]);
TextDrawSetString(vehiclepricestring);
format(stringsizeof(string), "%d  ~b~km"Vehicle[nextvehicle][km]);
TextDrawSetString(vehiclespeedstring);
//Then show em again to apply changes
TextDrawShowForPlayer(playeridvehiclename);
TextDrawShowForPlayer(playeridvehicleprice);
TextDrawShowForPlayer(playeridvehiclespeed); 
Reply
#5

No ok, wait i will re-explain everything, i think clearly.
Let's ****** translate talk:
"I do not know how to make the vehicles to record in a table when loading (if they are for sale), and when you click on an arrow, go get it the next vehicle that is for sale and display it"

I think it's better now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)