A little /v park edit
#1

pawn Код:
else if(strcmp(x_nr,"park",true) == 0)
                {
                    if(PlayerInfo[playerid][pCar] == 9999)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "You don't own a car.");
                        return 1;
                    }
                    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                    {
                        new carid = GetPlayerVehicleID(playerid);
                        if(carid == PlayerInfo[playerid][pCar])
                        {
                            new Float:x,Float:y,Float:z;
                            new Float:a;
                            GetPlayerName(playerid, playername, sizeof(playername));
                            GetVehiclePos(carid, x, y, z);
                            GetVehicleZAngle(carid, a);
                            CarInfo[carid][cLocationx] = x;
                            CarInfo[carid][cLocationy] = y;
                            CarInfo[carid][cLocationz] = z;
                            CarInfo[carid][cAngle] = a;
                            format(string, sizeof(string), "You have saved your vehicle at the position %f.01, %f.01, %f.01, Remember it, it will respawn here!",x,y,z);
                            SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                            SaveCar(carid);
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "You'r not in your car.");
                            return 1;
                        }
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "You'r not in a car.");
                        return 1;
                    }
                    return 1;
                }
I got this command.
But this command saves the car at the wanted location after a server restart.
How to make it save without a server restart?
Reply


Messages In This Thread
A little /v park edit - by Shannkz - 23.10.2012, 17:35
Re: A little /v park edit - by Youice - 23.10.2012, 19:06
Re: A little /v park edit - by Shannkz - 23.10.2012, 19:55
Re: A little /v park edit - by Shannkz - 23.10.2012, 20:54
Re: A little /v park edit - by Shannkz - 24.10.2012, 15:27

Forum Jump:


Users browsing this thread: 2 Guest(s)