28.07.2009, 14:14
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[128];
new vecCarid = Car_getVecCarID(vehicleid);
if(vecCarID != INVALID_CAR_ID)// (6105) : error 017: undefined symbol "vecCarID"
{
if(Cars[vecCarid][cOwned] == 0)
{
format(string,sizeof(string),"[ ! ] ID : %d ' %s ' Price : %d RCASH",vecCarid,Cars[vecCarid][cDescription],Cars[vecCarid][cPrice]);
SendClientMessage(playerid,COLOR_GREY,string);
}
}
if(Cars[vecCarid][cOwned] == 1)
{
format(string,sizeof(string),"[ ! ] ID : %d ' %s ' Bought by : %s",vecCarid,Cars[vecCarid][cDescription],Cars[vecCarid][cOwner]);
SendClientMessage(playerid,COLOR_GREY,string);
return 0;
}
return 1;
}
EDIT: Okay got it compiling.
EDIT #2 : I tried to add new vecCarid = Car_getVecCarID(vehicleid); to OnPlayerCommandText it says vehicleid is undefined lol. do i just make it playerid instead ?