29.03.2009, 11:07
I modified the HouseCarMaker by Jonte92. Now you can add normal Vehicles(With ID).
It's Simple.
How To Use:
Type /addcar comment When comment can be changed to a comment line.
This FilterScript Create A File Named "NormalCars.cfg"
At The Moment It Only Has A Bug. This No Creates New Lines In File All The Positions Will Be In One Line.
Here Is The Source:
Don't Remove Credits.
It's Simple.
How To Use:
Type /addcar comment When comment can be changed to a comment line.
This FilterScript Create A File Named "NormalCars.cfg"
At The Moment It Only Has A Bug. This No Creates New Lines In File All The Positions Will Be In One Line.
Here Is The Source:
Код:
#include <a_samp> #define FILTERSCRIPT #define White 0xFFFFFFAA /* This FS is made by Jax Martin. And it is only for private use, It is okay to modify it , but keep my credits! This FS Does only work for GodFather, And it's a "Add-On" To my HouseMaker to GodFather! Hope you'll enjoy it! Modified By Almamu Now You Can Add Normals Car. No House Car. */ public OnFilterScriptInit() { print("\n~~~~~~~~~~~~~JAX MARTIN~~~~~~~~~~~~~~"); print(" Goodfather House Car Maker "); print(" Copyrighted to Jax Martin™ "); print("Modified By Almamu For General Car Spawn"); print("~~~~~~~~~~~~~JAX MARTIN~~~~~~~~~~~~~~\n"); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; new idx; cmd = strtok(cmdtext, idx); if (strcmp(cmd, "/AddCar", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) { new temp = strlen(cmdtext); while ((idx < temp) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new comment[64]; while ((idx < temp) && ((idx - temp) < (sizeof(comment) - 1))) { comment[idx - offset] = cmdtext[idx]; idx++; } comment[idx - offset] = EOS; if(!strlen(comment)) { SendClientMessage(playerid, White, "Use: /AddCar <Comment>"); return 1; } new Float: X, Float:Y, Float:Z, Float:A; new Veh = GetPlayerVehicleID(playerid); new Text[355]; GetVehiclePos(Veh, X, Y, Z); GetVehicleZAngle(Veh, A); format(Text, sizeof(Text), "{%d,%f,%f,%f,%f},//%s", Veh, X, Y, Z, A, comment); new File: tfile; tfile = fopen("NormalCars.cfg", io_append); fwrite(tfile, Text); fclose(tfile); SendClientMessage(playerid, White, Text); } return 1; } return 0; } strtok(const text[], &index) { new length = strlen(text); while ((index < length) && (text[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (text[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = text[index]; index++; } result[index - offset] = EOS; return result; }