SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Help Archive (https://forum.sa-mp.com/forumdisplay.php?f=89)
-   -   Load playerid to load for all (https://forum.sa-mp.com/showthread.php?t=150570)

ArTisT 26/05/2010 09:45 PM

Load playerid to load for all
 
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


All times are GMT. The time now is 12:43 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.