21.08.2011, 07:26
Okay, i have started to make the script. Here it is:
But there is an error on this line:
ERROR: Undefined symbol udb_encode
How can i fix it?
pawn Code:
new carworld;
if(strcmp(cmd, "/park", true) == 0)
{
new currentcar;
currentcar = GetPlayerVehicleID(playerid);
carworld = GetVehicleVirtualWorld(currentcar);
if (!dini_Exists(carintvw(playerid)))
{
dini_Create(carintvw(playerid));
}
SaveStats(playerid);
}
return 1;
}
forward LoadVWandInt(playerid);
public LoadVWandInt(playerid)
{
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), carworld);
KillTimer(Loadcarintandwv);
return 1;
}
Player(playerid)
{
new player[MAX_PLAYER_NAME];
GetPlayerName(playerid, player, sizeof(player));
return player;
}
carintvw(playerid)
{
new a[256]; format(a, sizeof(a), "/ParkedVehicles/%s.ini",udb_encode(Player(playerid)));
return a;
}
SaveStats(playerid)
{
dini_IntSet(carintvw(playerid), "carworld", carworld);
//dini_IntSet(carintvw(playerid), "PositionY", floatround(positiony));
//dini_IntSet(carintvw(playerid), "PositionZ", floatround(positionz));
}
LoadStats(playerid)
{
carworld = dini_Int(carintvw(playerid), "carworld");
//positiony = dini_Int(carintvw(playerid), "PositionY");
//positionz = dini_Int(carintvw(playerid), "PositionZ");
}
pawn Code:
carintvw(playerid)
{
new a[256]; format(a, sizeof(a), "/ParkedVehicles/%s.ini",udb_encode(Player(playerid))); // This line
return a;
}
How can i fix it?

