Problem with TogglePlayerSpectating
#4

well where exactly it spawns you ?
where the player's veh. was?
and you can give a try to this
pawn Код:
if (strcmp(cmd, "/findmycar", true) ==0 )
    {
            new Float:ax,Float:ay,Float:az;
            GetPlayerPos(playerid,ax,ay,az);
            findcarX[playerid] = ax;
            findcarY[playerid] = ay;
            findcarZ[playerid] = az;
        if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "* You can't use this command from inside a vehicle");
        if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command from an interior");
        if(dini_Int(PFile(playerid),"HaveCar") == 0) return SendClientMessage(playerid, COLOR_GREY, "   You don't have a personal car !");
        /*if(transporter[playerid] != 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "On a mission right now, can't use this command !");
            return 1;
        }*/

        if(PlayerInfo[playerid][pFindcarTime] == 0)
        {
            new Float:A, Float:B, Float:C;
            findcar[playerid] = 1;
            GetVehiclePos(Pc(playerid),A,B,C);
            SetPlayerMapIcon(playerid, 99, A, B, C, 55, 0, MAPICON_GLOBAL_CHECKPOINT);
            PlayerInfo[playerid][pFindcarTime] = 60;
            TogglePlayerSpectating(playerid, 1);
            PlayerSpectateVehicle(playerid, Pc(playerid));
            SetTimerEx("specfind", 5000, 0, "d", playerid);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Your current car position has been shown as a car icon on the map");
            return 1;
        }
        else
        {
            format(string, sizeof(string), "Trebuie sa astepti %d secunde pentru a recauta masina !", PlayerInfo[playerid][pFindcarTime]);
            SendClientMessage(playerid, COLOR_GREY, string);
            return 1;
        }
Reply


Messages In This Thread
Problem with TogglePlayerSpectating - by TuTh - 12.11.2012, 12:58
Re: Problem with TogglePlayerSpectating - by Abhishek. - 12.11.2012, 13:17
Re: Problem with TogglePlayerSpectating - by TuTh - 12.11.2012, 13:25
Re: Problem with TogglePlayerSpectating - by Abhishek. - 12.11.2012, 13:28
Re: Problem with TogglePlayerSpectating - by TuTh - 12.11.2012, 18:06

Forum Jump:


Users browsing this thread: 3 Guest(s)