little question - 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: little question (
/showthread.php?tid=107445)
little question -
wert - 09.11.2009
I can't get this work
Код:
forward Randomccar();
public Randomcolor()
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
ChangeVehicleColor(vehicle, random(126), random(126));
}
Код:
E:\GTA San Andreas\gamemodes\mygm.pwn(677) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: little question -
Streetplaya - 09.11.2009
Your function doesn't get a 'playerid' passed.
I guess you're using it with combination of a timer, use SetTimerEx instead of SetTimer then
Re: little question -
wert - 09.11.2009
That Helped Thanks
Re: little question -
bajskorv123 - 09.11.2009
Код:
forward Randomccar();
public Randomcolor()
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
ChangeVehicleColor(vehicle, random(126), random(126));
}
Else you can just change Randomccar(); and Randomcolor() to Randomccar(playerid); and Randomcolor(playerod)
Hope this helped thanks
Re: little question -
dice7 - 09.11.2009
That will only work for playerid 0