/engine error
#1

hello guys i have a problem with this command, it gives me no errors, just doesn't work! please help

Код:
CMD:engine(playerid,params[])
{
    if(PlayerInfo[playerid][pLogged] == 0) return SendClientMessage(playerid,COLOR_WHITE,"**** You need to login/register first!");
    new veh, engine, lights, alarm, doors, bonnet, boot, objective, Name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid,Name,sizeof(Name));
    veh = GetPlayerVehicleID(playerid);
	GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
	if(engine == 1)
	{
		SetVehicleParamsEx(veh,0,0,alarm,doors,bonnet,boot,objective);
		format(string,sizeof(string),"* %s has turned off the car's engine.",Name);
		ProxDetector(playerid, 40.0, string, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF); // green: 0x61E659FF
	}
	else
	if(engine == 0)
	{
		SetVehicleParamsEx(veh,1,1,alarm,doors,bonnet,boot,objective);
		format(string,sizeof(string),"* %s has turned on the car's engine.",Name);
		ProxDetector(playerid, 40.0, string, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF); // green: 0x61E659FF
	}
	return 1;
}
Reply
#2

pawn Код:
CMD:engine(playerid,params[])
{
    if(PlayerInfo[playerid][pLogged] == 0) return SendClientMessage(playerid,COLOR_WHITE,"**** You need to login/register first!");
    new veh, engine, lights, alarm, doors, bonnet, boot, objective, Name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid,Name,sizeof(Name));
    veh = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
    if(engine == 1)
    {
        SetVehicleParamsEx(veh,0,0,alarm,doors,bonnet,boot,objective);
        format(string,sizeof(string),"* %s has turned off the car's engine.",Name);
        ProxDetector(playerid, 40.0, string, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF); // green: 0x61E659FF
    }
    else
    {
        SetVehicleParamsEx(veh,1,1,alarm,doors,bonnet,boot,objective);
        format(string,sizeof(string),"* %s has turned on the car's engine.",Name);
        ProxDetector(playerid, 40.0, string, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF); // green: 0x61E659FF
    }
    return 1;
}
Reply
#3

You could give us the errors.. how are we suppose to know what to do...
Reply
#4

man, it gives me no errors!
Reply
#5

Quote:
Originally Posted by xganyx
Посмотреть сообщение
pawn Код:
CMD:engine(playerid,params[])
{
    if(PlayerInfo[playerid][pLogged] == 0) return SendClientMessage(playerid,COLOR_WHITE,"**** You need to login/register first!");
    new veh, engine, lights, alarm, doors, bonnet, boot, objective, Name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid,Name,sizeof(Name));
    veh = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
    if(engine == 1)
    {
        SetVehicleParamsEx(veh,0,0,alarm,doors,bonnet,boot,objective);
        format(string,sizeof(string),"* %s has turned off the car's engine.",Name);
        ProxDetector(playerid, 40.0, string, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF); // green: 0x61E659FF
    }
    else
    {
        SetVehicleParamsEx(veh,1,1,alarm,doors,bonnet,boot,objective);
        format(string,sizeof(string),"* %s has turned on the car's engine.",Name);
        ProxDetector(playerid, 40.0, string, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF, 0xFFBFFFFF); // green: 0x61E659FF
    }
    return 1;
}
thanks, it's working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)