Some annoying bug
#4

Код:
CMD:nrg(playerid, params[])
{
    new Float:x, Float:y, Float:z, Float:angle;
    GetPlayerPos(playerid, x, y, z);
    GetPlayerFacingAngle(playerid, angle);
    if(PlayerAcc[playerid][Log] == 0) return SendClientMessage(playerid, COLOR_RED, "Error: You are not logged in!");
	{
		if(CarId[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(CarId[playerid]);
	    CarId[playerid] = CreateVehicle(522, x, y, z, angle, -1, -1, 6000);
		PutPlayerInVehicle(playerid, CarId[playerid], 0);
	    SendClientMessage(playerid, COLOR_LIME, "You spawn an nrg!");
	}
	return 1;
}

CMD:car(playerid, params[])
{
    new Float:x, Float:y, Float:z, Float:angle;
    GetPlayerPos(playerid, x, y, z);
    GetPlayerFacingAngle(playerid, angle);
    if(PlayerAcc[playerid][Log] == 0) return SendClientMessage(playerid, COLOR_RED, "Error: You are not logged in!");
	{
		if(CarId[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(CarId[playerid]);
	    CarId[playerid] = CreateVehicle(411, x, y, z, angle, -1, -1, 6000);
		PutPlayerInVehicle(playerid, CarId[playerid], 0);
	    SendClientMessage(playerid, COLOR_LIME, "You spawn an infernus!");
	}
	return 1;
}
Код:
CMD:v(playerid, params[])
{
	new string[128], vID[32], vid, Float:x, Float:y, Float:z, Float:ang;
	if(sscanf(params, "s[32]", vID)) return SendClientMessage(playerid, COLOR_RED, "Syntax: /v (carname)");
	if(isnumeric(vID)) vid = strval(vID);
	else vid = GetVehicleModelIDFromName(vID);
	if (vid < 400 || vid > 611) return SendClientMessage(playerid, COLOR_RED, "Vehicle ID Maxium (Left): 400 - Maxium (Right): 611");
	GetPlayerPos(playerid,x,y,z);
	GetPlayerFacingAngle(playerid,ang);
	if(CarId[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(CarId[playerid]);
	CarId[playerid] = CreateVehicle(vid, x, y, z, ang, -1, -1, 6000);
	LinkVehicleToInterior(CarId[playerid], GetPlayerInterior(playerid));
	SetVehicleVirtualWorld(CarId[playerid], GetPlayerVirtualWorld(playerid));
	PutPlayerInVehicle(playerid, CarId[playerid], 0);
	format(string, sizeof(string), "You've spawned vehicle id %i - %s", vid, VehicleName[vid - 400]);
	SendClientMessage(playerid, COLOR_YELLOW, string);
	return 1;
}
and some dialog bug

when im in a vehicle and i type a command that display a message dialog, when i click on ok or press esc, my vehicle destroy
Reply


Messages In This Thread
Some annoying bug - by suni - 31.05.2015, 13:38
Re: Some annoying bug - by Jakwob - 31.05.2015, 13:39
Re: Some annoying bug - by Konstantinos - 31.05.2015, 14:08
Re: Some annoying bug - by suni - 31.05.2015, 14:23
Re: Some annoying bug - by Konstantinos - 31.05.2015, 14:29
Re: Some annoying bug - by suni - 31.05.2015, 15:07
Re: Some annoying bug - by amirm3hdi - 31.05.2015, 15:24
Re: Some annoying bug - by SoFahim - 31.05.2015, 15:27
Re: Some annoying bug - by suni - 31.05.2015, 15:55
Re: Some annoying bug - by SoFahim - 31.05.2015, 16:59

Forum Jump:


Users browsing this thread: 1 Guest(s)