Load playerid to load for all
#1

Quote:

forward LoadPlayerVehicle(playerid);
public LoadPlayerVehicle(playerid)
{



new openfile[128];
format(openfile, sizeof openfile, VEH_SAVE_FILE, GetName(playerid));
//if (!fexist(openfile)) return 1; // He doesn't own a vehicle
new File:vehs = fopen(openfile,io_read);
new string[256];
new load[40][32];
new newload = 19; // last "strval(load[x])" before the mods loop
if (vehs)
{
print("attempting to read file");
while (fread(vehs, string, 256))
{
split(string, load, '|');

print("spawning vehicles");

I want change this to this: (removed playerid)
Quote:

forward LoadPlayerVehicle();
public LoadPlayerVehicle()
{



new openfile[128];
format(openfile, sizeof openfile, VEH_SAVE_FILE, GetName(playerid));
//if (!fexist(openfile)) return 1; // He doesn't own a vehicle
new File:vehs = fopen(openfile,io_read);
new string[256];
new load[40][32];
new newload = 19; // last "strval(load[x])" before the mods loop
if (vehs)
{
print("attempting to read file");
while (fread(vehs, string, 256))
{
split(string, load, '|');

print("spawning vehicles");

What i need to put here: GetName(playerid)

Info: It's a carownership code (half) wich loads the vehcile only if the player join and i want to change it it should load the car when the server is started
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)