You can sell the another player's car (/sellveh problem)
#2

Look at this command:

Код:
if (strcmp("/parkmycar", cmdtext, true, 10) == 0)
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must be in your car for this action");
        if(GetCreatorID(vehicleid)!=0)
        {
            if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
            {
                new Float:VHealth;
                GetVehicleHealth(vehicleid, VHealth);
                if(VHealth >= 550)
                {
	                new Float:vx,Float:vy,Float:vz,Float:va;
	                GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,vz);
	                GetVehicleZAngle(GetPlayerVehicleID(playerid),va);
	                VehicleSystem[GetCreatorID(vehicleid)][xc]=vx;
	                VehicleSystem[GetCreatorID(vehicleid)][yc]=vy;
	                VehicleSystem[GetCreatorID(vehicleid)][zc]=vz;
	                VehicleSystem[GetCreatorID(vehicleid)][ac]=va;
	                SendClientMessage(playerid,COLOR_WHITE,"Masina a fost parcata aici!");
	                SendClientMessage(playerid,COLOR_YELLOW,"NOTE:Masina a fost Respawnata pentru a se salva locatia!");
	               	new Float:slx, Float:sly, Float:slz;
					GetPlayerPos(playerid, slx, sly, slz);
					SetPlayerPos(playerid, slx+1.3, sly, slz);
					new create = GetCreatorID(vehicleid);
					DestroyVehicle(vehicleid);
	        		new CAR = CreateVehicle(VehicleSystem[create][cmodel],VehicleSystem[create][xc],VehicleSystem[create][yc],VehicleSystem[create][zc],VehicleSystem[create][ac],VehicleSystem[create][Farbe1],VehicleSystem[create][Farbe2],-1);
	        		SetVehicleNumberPlate(CAR, VehicleSystem[GetCreatorID(vehicleid)][owner]);
	        		Tunen(CAR);
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "* Vehicle health to low! ");
				}
            }
        }
        return 1;
    }
i want to put "You must be in your car for this action" in the /sellveh command
Reply


Messages In This Thread
You can sell the another player's car (/sellveh problem) - by MrBlake - 21.08.2012, 09:10
Re: You can sell the another player's car (/sellveh problem) - by MrBlake - 21.08.2012, 09:22

Forum Jump:


Users browsing this thread: 1 Guest(s)