SA-MP Forums Archive
help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help (/showthread.php?tid=80147)



help - luckie12 - 02.06.2009

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


Re: help - luckie12 - 02.06.2009

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


Re: help - Gamer007 - 02.06.2009

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


Re: help - luckie12 - 02.06.2009

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 >.<


Re: help - luckie12 - 02.06.2009

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)?


Re: help - luckie12 - 02.06.2009

Replace 562

replace whit IsPlayerInVehicle(playerid,560)?


Re: help - luckie12 - 02.06.2009

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



Re: help - Gamer007 - 02.06.2009

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;
}



Re: help - luckie12 - 02.06.2009

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.



Re: help - luckie12 - 02.06.2009

i changed this if(IsPlayerInVehicle(playerid)) to

if(IsPlayerInVehicle(playerid, 560))

it compiles perfect