Help? -
eblood1 - 04.02.2014
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?
Re: Help? -
Shockey HD - 04.02.2014
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
Re: Help? -
Don_Cage - 04.02.2014
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
Re: Help? -
eblood1 - 04.02.2014
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..
Re: Help? -
Shockey HD - 04.02.2014
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
Re: Help? -
eblood1 - 04.02.2014
Deleted
Re: Help? -
eblood1 - 04.02.2014
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);
Re: Help? -
RajatPawar - 04.02.2014
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
Re: Help? -
eblood1 - 04.02.2014
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.
Re: Help? -
Beckett - 04.02.2014
Do you even have a database and a scripted saving system?