How to load vehicles from file?
#1

Hello,

Im making a park command and im wondering how to load vehicle coordinates from a file, But only if its named a certain thing,

Lets say i typed /park, And in parkedcars.ini it would say Torran - XCoord, YCoord, ZCoord, Angle

But in my script how would i load them coordinates, ONLY if the names torran,
Reply
#2

idk what u mean but take a look at that code :

Код:
new total_vehicles_from_files=0;
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(strcmp("/park", cmd, true) == 0) {
 if(strcmp(name, "Torran") == 0) {
    total_vehicles_from_files += LoadStaticVehiclesFromFile("parkedcars.ini"); // should be in scriptfiles
    return 1;
    }
     else return SendClientMessage(playerid, COLOR_RED, " You Aren't Torran");
}
________
IOLITE PORTABLE BUTANE VAPORIZER
Reply
#3

That would load the code,
And id need it for other people too,
Like roleplay /park commands
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)