SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 26/05/2010, 08:45 PM   #1
ArTisT
Big Clucker
 
Join Date: Mar 2009
Posts: 102
Reputation: 0
Default 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
ArTisT is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NPC load martin149 Help Archive 2 24/06/2010 09:52 AM
[HELP] GM load. Lynn09ę Help Archive 7 19/12/2009 08:51 AM
i cant load it brandonp Client Support 1 12/10/2009 02:26 PM
SA:MP cant load MasterDevil Client Support 13 25/08/2009 03:05 PM
Help~SA:MP But doesn't Load tekage Client Support 3 26/04/2009 01:36 AM


All times are GMT. The time now is 09:12 AM.


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