little question
#1

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.
Reply
#2

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
Reply
#3

That Helped Thanks
Reply
#4

Код:
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
Reply
#5

That will only work for playerid 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)