SA-MP Forums Archive
[REQ] [FS] Scripted/un-scripted - AddStaticVehicleEx - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [REQ] [FS] Scripted/un-scripted - AddStaticVehicleEx (/showthread.php?tid=253796)



[REQ] [FS] Scripted/un-scripted - AddStaticVehicleEx - Jack_Leslie - 08.05.2011

Is there a filterscript that saves a position to a file but as AddStaticVehicleEx, I had one before but it doesn't work now, it was /savemode then /type AddStaticVehicleEx then /savepos and it saved it to a text file.


Re: [REQ] [FS] Scripted/un-scripted - AddStaticVehicleEx - Seven_of_Nine - 08.05.2011

Well, nobody will make it like this.. :\
Sorry :[


Re: [REQ] [FS] Scripted/un-scripted - AddStaticVehicleEx - Lorenc_ - 08.05.2011

This helps me alot, try it out, its free and there is one!


Re: [REQ] [FS] Scripted/un-scripted - AddStaticVehicleEx - Joe Staff - 08.05.2011

or simply make the command

pawn Код:
YourCommandStyle // DCMD,CMD,if(!strcmp()), etc -- Suggested name: /SaveEx
{
    if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0x80000000,"Must be RCON admin to use this command");
    if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,0x80000000,"Must be inside a vehicle");
    new File:file,strtmp[128],Float:x,Float:y,Float:z,Float:a,vehid;
    file=fopen("SavedLocations.txt",io_append);
    vehid=GetPlayerVehicleID(playerid);
    GetVehiclePos(vehid,x,y,z);
    GetVehicleZAngle(vehid,a);
    format(strtmp,128,"AddStaticVehicleEx(%d, %f, %f, %f, %f, -1, -1, -1);\n",GetVehicleModelID(vehid),x,y,z,a);
    fwrite(file,strtmp);
    fclose(file);
    return SendClientMessage(playerid,0x00800000,"Vehicle successfully saved.");
}