Problem with cars
#1

Here is my code.

pawn Код:
if((strcmp("/race", cmdtext, true) == 0) || (strcmp("/race", cmdtext, true) == 0))
    {
        SetPlayerInterior(playerid,7);
        SendClientMessage(playerid, 0x00FFFFAA, "You've been teleported to Race.");
        SetPlayerCheckpoint(playerid, -1394.54,-243.56,1043.20, 13.0);
        new vehicleid = CreateVehicle(415,-1394.54,-243.56,1043.20, 180.0, -1, -1, -1);
        LinkVehicleToInterior(vehicleid,7);
        PutPlayerInVehicle(playerid,vehicleid, 0);
        return 1;
    }
My problem - When the player types /race it doesn't delete the car that was there before (what he used) so if the player types /race 5 times, there will be 5 cars there (in my case 5 cheetahs) so how do I make it so it deletes the current car and spawns you in a new one?
Reply


Messages In This Thread
Problem with cars - by Beginnercoder - 13.02.2011, 14:55
Re: Problem with cars - by JaTochNietDan - 13.02.2011, 14:58
Re: Problem with cars - by Beginnercoder - 13.02.2011, 15:07

Forum Jump:


Users browsing this thread: 1 Guest(s)