[HELP] I made a CMD /park
#5

Quote:
Originally Posted by Rav
Lots of things wrong with that too.. for example, why do you read from a file you only need to write to? Why aren't you looping through all the available vehicles? Why do you try to write to a file when it's opened in io_read mode (that only allows reading a file..)? Why do you close a the file handler when you need it later on in the loop?

Try looking at some tutorials first
Can you show a small Example of how it supposed to be.... I'm learning ...
ohh and I tried doing lie you said by checking the Vehicle Pos instead of the PlayerPos
I get this:
Код:
C:\Documents and Settings\User\Desktop\SAMP GameMode\filterscripts\VOS.pwn(233) : error 028: invalid subscript (not an array or too many subscripts): "X"
C:\Documents and Settings\User\Desktop\SAMP GameMode\filterscripts\VOS.pwn(233) : warning 215: expression has no effect
C:\Documents and Settings\User\Desktop\SAMP GameMode\filterscripts\VOS.pwn(233) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\User\Desktop\SAMP GameMode\filterscripts\VOS.pwn(233) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\SAMP GameMode\filterscripts\VOS.pwn(233) : fatal error 107: too many error messages on one line
Here is the Command:
pawn Код:
if(strcmp(cmdtext, "/park", true) == 0)
    {
      if(IsPlayerInAnyVehicle(playerid))
      {
            new vID = GetPlayerVehicleID(playerid);
        new Float:X, Float:Y, Float:Z, Float:A;
          GetVehiclePos(vID, X[vID], Y[vID], Z[vID]);
            GetVehicleZAngle(vID, A[vID]);
        vehX = X;
        vehY = Y;
        vehZ = Z;
        vehAng = A;
            SaveCars();
        }
        return 1;
    }
I know it doesn't check if the player owns the Vehicle, I want to fix the Saving problem first
Reply


Messages In This Thread
[HELP] I made a CMD /park - by Castle - 17.03.2009, 13:21
Re: [HELP] I made a CMD /park - by [RP]Rav - 17.03.2009, 14:20
Re: [HELP] I made a CMD /park - by Castle - 17.03.2009, 14:23
Re: [HELP] I made a CMD /park - by [RP]Rav - 17.03.2009, 14:27
Re: [HELP] I made a CMD /park - by Castle - 17.03.2009, 14:36
Re: [HELP] I made a CMD /park - by [RP]Rav - 17.03.2009, 14:44
Re: [HELP] I made a CMD /park - by Castle - 17.03.2009, 15:03

Forum Jump:


Users browsing this thread: 1 Guest(s)