#1

hi i need help with this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/elegy", true)==0)
     {
    AddVehicleComponent(562, 1010);
    AddVehicleComponent(562, 1034);
    AddVehicleComponent(562, 1036);
      AddVehicleComponent(562, 1146);
      AddVehicleComponent(562, 1149);
      AddVehicleComponent(562, 1171);
    ChangeVehiclePaintjob(562, 3);
      ChangeVehicleColor(562, 6, 6);
    return 1;
    }
    if (strcmp("/sultan", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInVehicle(playerid,560))
    {
        ChangeVehiclePaintjob(560, 3);
        ChangeVehicleColor(560, 6, 6);
        SetVehicleNumberPlate(560, "Future");
        AddVehicleComponent(560, 1139);
        AddVehicleComponent(560, 1169);
        AddVehicleComponent(560, 1010);
        AddVehicleComponent(560, 1141);
    }
    return 1;
}
    return 0;
}
#endif
if someone go into a sultan/elegy and they type /sultan or /elegy the car doesnt tune

please help

send me code or anything

pleasse help

ty alot
Reply
#2

Quote:
Originally Posted by JeNkStAX
Replace 562 with GetPlayerVehicleID(playerid).
can you send the code please
Reply
#3

i suggest you stop copying commands from others as i saw 2topics of the same command you have and same problem.
Reply
#4

Quote:
Originally Posted by Gamer007
i suggest you stop copying commands from others as i saw 2topics of the same command you have and same problem.
gamer007 this is my comand 1 topic whas of my own and that another topic is from my friend >.<
Reply
#5

Quote:
Originally Posted by JeNkStAX
pawn Код:
ChangeVehiclePaintjob(560, 3); // ChangeVehiclePaintjob(vehicleid, paintjobid);
ChangeVehicleColor(560, 6, 6); // ChangeVehicleColor(vehicleid, color1, color2);
SetVehicleNumberPlate(560, "Future"); // SetVehicleNumberPlate(vehicleid, plate);
AddVehicleComponent(560, 1139); // AddVehicleComponent(vehicleid, componentid);
I dont know where you got the vehicle id 560 from, Use GetPlayerVehicleID(playerid) instead.
yeah but where to place GetPlayerVehicleID(playerid)?
Reply
#6

Replace 562

replace whit IsPlayerInVehicle(playerid,560)?
Reply
#7

Quote:
Originally Posted by JeNkStAX
Quote:
Originally Posted by luckie12
Replace 562

replace whit IsPlayerInVehicle(playerid,560)?
Read my posts.
Quote:
Originally Posted by JeNkStAX
Replace 562 with GetPlayerVehicleID(playerid).
I wont telling you again.


now i have this
pawn Код:
if (strcmp("/sultan", cmdtext, true, 10) == 0)
    {
    if(GetPlayerVehicleID(playerid))
    {
        ChangeVehiclePaintjob(560, 3);
        ChangeVehicleColor(560, 6, 6);
        SetVehicleNumberPlate(560, "Future");
        AddVehicleComponent(560, 1139);
        AddVehicleComponent(560, 1169);
        AddVehicleComponent(560, 1010);
        AddVehicleComponent(560, 1141);
    }
    return 1;
}
    return 0;
}
#endif
Reply
#8

Learn to god damn read dude!!!!

Код:
	if (strcmp("/sultan", cmdtext, true, 10) == 0)
	{
    if(IsPlayerInVehicle(playerid))
    {
        ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 3); // AND ALL DO THE SAME LIKE THIS<!!!!!!
        ChangeVehicleColor(560, 6, 6);
        SetVehicleNumberPlate(560, "Future");
        AddVehicleComponent(560, 1139);
        AddVehicleComponent(560, 1169);
        AddVehicleComponent(560, 1010);
        AddVehicleComponent(560, 1141);
    }
    return 1;
}
	return 0;
}
Reply
#9

Quote:
Originally Posted by Gamer007
Learn to god damn read dude!!!!

Код:
	if (strcmp("/sultan", cmdtext, true, 10) == 0)
	{
    if(IsPlayerInVehicle(playerid))
    {
       ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), 3); // AND ALL DO THE SAME LIKE THIS<!!!!!!
       ChangeVehicleColor(560, 6, 6);
       SetVehicleNumberPlate(560, "Future");
       AddVehicleComponent(560, 1139);
       AddVehicleComponent(560, 1169);
       AddVehicleComponent(560, 1010);
       AddVehicleComponent(560, 1141);
    }
    return 1;
}
	return 0;
}
pawn Код:
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\commands.pwn(49) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Reply
#10

i changed this if(IsPlayerInVehicle(playerid)) to

if(IsPlayerInVehicle(playerid, 560))

it compiles perfect
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)