#1

how i can add so it says owned by [player's name] from folder..

SendClientMessage(playerid,0xFF0000,"This vehicle is owned by [player's name] "); and exit player out the car?
Reply
#2

pawn Код:
new String[128]; // Imma use string size 128

format(String, sizeof String("This vehicle is owned by %s", vData[vehicleid][pOwner]); // Im going to use vData[vehicleid][pOwner] as a example

SendClientMessage(playerid, 0xFF0000, String);
I suggest storing data into enums,

then just calling them from the enum..

Edit: didnt see the ejection from vehicle:

https://sampwiki.blast.hk/wiki/RemovePlayerFromVehicle


and check out enums:

https://sampwiki.blast.hk/wiki/Keywords:Initialisers#enum
Reply
#3

pawn Код:
new string[128];
format(string, sizeof(string),"This vehicle belongs to %s",CarInfo[vehicleid][cOwner]);
SendClientMessage(playerid, -1,string);
RemovePlayerFromVehicle(playerid);
You must change the CarInfo[vehicleid][cOwner] to whatever you store the owner name in.

EDIT: He was first
Reply
#4

Quote:
Originally Posted by Shockey HD
Посмотреть сообщение
pawn Код:
new String[128]; // Imma use string size 128

format(String, sizeof String("This vehicle is owned by %s", vData[vehicleid][pOwner]); // Im going to use vData[vehicleid][pOwner] as a example

SendClientMessage(playerid, 0xFF0000, String);
I suggest storing data into enums,

then just calling them from the enum..
How i can make it work with a folder?
for example... Extreme Stunting\scriptfiles\Cars and the file..
Reply
#5

Quote:
Originally Posted by eblood1
Посмотреть сообщение
How i can make it work with a folder?
for example... Extreme Stunting\scriptfiles\Cars and the file..
Thats a database..

You can use like Y_Ini or Mysql and im sure a few other things:

here is y_ini

https://sampforum.blast.hk/showthread.php?tid=175565
Reply
#6

Deleted
Reply
#7

i added this but it says the player name not the owner's :/ help?

Код:
GetPlayerName(playerid, pname, sizeof(pname));
	new file[256], String[256];format(String,sizeof(String),"This car is Owned by %s", pname, dini_Get(file, "Cars/%.sav"));
	SendClientMessage(playerid, 0xFF0000, String);
Reply
#8

Sorry for being such a preacher, but..

You are possibly not a person well acquainted with PAWN, and/or it's SA-MP implementation - and the thing you want to do requires knowledge about running file systems, using them and so on. Check the functions used (INI_Get, YINI_Get) and then search for the appropiate file system, learn HOW to use it, and then you'll be able to do it. Frankly, given your knowledge (I am assuming, sorry!) you should take up something simpler. Check out tutorials on files on the forums. Because - no one can provide you with the EXACT solution since no one has the script you have! If you have downloaded it, ask it in the respective thread.

Cheers
Reply
#9

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
Sorry for being such a preacher, but..

You are possibly not a person well acquainted with PAWN, and/or it's SA-MP implementation - and the thing you want to do requires knowledge about running file systems, using them and so on. Check the functions used (INI_Get, YINI_Get) and then search for the appropiate file system, learn HOW to use it, and then you'll be able to do it. Frankly, given your knowledge (I am assuming, sorry!) you should take up something simpler. Check out tutorials on files on the forums. Because - no one can provide you with the EXACT solution since no one has the script you have! If you have downloaded it, ask it in the respective thread.

Cheers
thats all i need it say it all there. i just need to know what i have to do to say the owner's name not the player that is taken the car.
Reply
#10

Do you even have a database and a scripted saving system?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)