17.03.2017, 05:28
Hi
i Tired To Fix This Problem My Vehicle Not Loading
From Server_Log
my system
help pls
i Tired To Fix This Problem My Vehicle Not Loading
From Server_Log
Quote:
[22:07:47] [join] ZombieS has joined the server (0:127.0.0.1) [22:07:47] candidate: 128AE4 [22:07:47] 118616 [22:07:47] 33554895 [22:07:47] 84017153 [22:07:47] *** YSI Error: Format specifier didn't match on inline function loadvehicle: 05020001 != FFFFFFFB |
PHP код:
#include <a_samp>
#include <Streamer>
#include <zcmd>
#include <sscanf2>
#include <YSI\y_ini>
#include <YSI\y_inline>
enum InfoVehicles
{
vehicle,
model,
world,
interior,
Float:x_,
Float:y_,
Float:z_
};
new vInfo[MAX_PLAYERS][InfoVehicles];
public OnPlayerConnect(playerid)
{
if(fexist(FolderVehicles(playerid)))
{
inline loadvehicle(string:name[], string:value[])
{
INI_Int("model", vInfo[playerid][model]);
INI_Int("world", vInfo[playerid][world]);
INI_Int("interior", vInfo[playerid][interior]);
INI_Float("pos:x", vInfo[playerid][x_]);
INI_Float("pos:y", vInfo[playerid][y_]);
INI_Float("pos:z", vInfo[playerid][z_]);
}
INI_ParseFile(FolderVehicles(playerid), "loadvehicle");
vInfo[playerid][vehicle] = 1;
}
else if(!fexist(FolderVehicles(playerid)))
{
vInfo[playerid][vehicle] = 0;
}
return true;
}
public OnPlayerDisconnect(playerid, reason)
{
if(vInfo[playerid][vehicle] != 0)
{
new Float:pos[3];
GetVehiclePos(vInfo[playerid][vehicle], pos[0], pos[1], pos[2]);
PutPlayerInVehicle(playerid, vInfo[playerid][vehicle], 0);
new INI:File = INI_Open(FolderVehicles(playerid));
INI_SetTag(File, "Info vehicle");
INI_WriteInt(File, "model", vInfo[playerid][model]);
INI_WriteInt(File, "world", GetVehicleVirtualWorld(vInfo[playerid][vehicle]));
INI_WriteInt(File, "interior", GetPlayerInterior(playerid));
INI_WriteFloat(File, "pos:x", pos[0]);
INI_WriteFloat(File, "pos:y", pos[1]);
INI_WriteFloat(File, "pos:z", pos[2]);
INI_Close(File);
//..
DestroyVehicle(vInfo[playerid][vehicle]);
}
return true;
}
public OnPlayerRequestSpawn(playerid)
{
if(vInfo[playerid][vehicle] != 0)
{
vInfo[playerid][vehicle] = CreateVehicle(vInfo[playerid][model], vInfo[playerid][x_], vInfo[playerid][y_], vInfo[playerid][z_], 3, random(126), random(126), (60*60));
SetVehicleVirtualWorld(vInfo[playerid][vehicle], vInfo[playerid][world]);
LinkVehicleToInterior(vInfo[playerid][vehicle], vInfo[playerid][interior]);
}
return true;
}
FolderVehicles(playerid)
{
new string[80], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "/vehicles/%s.ini", name);
return string;
}
CMD:cars(playerid, params[])
{
if(sscanf(params, "i", params[0]))
return SendClientMessage(playerid, -1, "usage: /cars [vehicle 1-7].");
if(vInfo[playerid][vehicle] != 0)
{
DestroyVehicle(vInfo[playerid][vehicle]);
}
//..
new Float:pos[4];
GetPlayerFacingAngle(playerid, pos[3]);
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
//..
switch(params[0])
{
case 1:
{
if(GetPlayerMoney(playerid) < 1200000)
return SendClientMessage(playerid, 0, "You don't have enough cash to buy this car!");
vInfo[playerid][vehicle] = CreateVehicle(541, pos[0], pos[1], pos[2], pos[3], random(126), random(126), (60*60));
GivePlayerMoney(playerid, -1200000);
vInfo[playerid][model] = 541;
}
case 2:
{
if(GetPlayerMoney(playerid) < 1900000)
return SendClientMessage(playerid, 0, "You don't have enough cash to buy this car!");
vInfo[playerid][vehicle] = CreateVehicle(411, pos[0], pos[1], pos[2], pos[3], random(126), random(126), (60*60));
GivePlayerMoney(playerid, -1900000);
vInfo[playerid][model] = 411;
}
case 3:
{
if(GetPlayerMoney(playerid) < 4000000)
return SendClientMessage(playerid, 0, "You don't have enough cash to buy this car!");
vInfo[playerid][vehicle] = CreateVehicle(494, pos[0], pos[1], pos[2], pos[3], random(126), random(126), (60*60));
GivePlayerMoney(playerid, -4000000);
vInfo[playerid][model] = 494;
}
case 4:
{
if(GetPlayerMoney(playerid) < 22000)
return SendClientMessage(playerid, 0, "You don't have enough cash to buy this car!");
vInfo[playerid][vehicle] = CreateVehicle(409, pos[0], pos[1], pos[2], pos[3], random(126), random(126), (60*60));
GivePlayerMoney(playerid, -22000);
vInfo[playerid][model] = 409;
}
case 5:
{
if(GetPlayerMoney(playerid) < 460000)
return SendClientMessage(playerid, 0, "You don't have enough cash to buy this car!");
vInfo[playerid][vehicle] = CreateVehicle(560, pos[0], pos[1], pos[2], pos[3], random(126), random(126), (60*60));
GivePlayerMoney(playerid, -460000);
vInfo[playerid][model] = 560;
}
case 6:
{
if(GetPlayerMoney(playerid) < 600000)
return SendClientMessage(playerid, 0, "You don't have enough cash to buy this car!");
vInfo[playerid][vehicle] = CreateVehicle(506, pos[0], pos[1], pos[2], pos[3], random(126), random(126), (60*60));
GivePlayerMoney(playerid, -600000);
vInfo[playerid][model] = 506;
}
case 7:
{
if(GetPlayerMoney(playerid) < 5000000)
return SendClientMessage(playerid, 0, "You don't have enough cash to buy this car!");
vInfo[playerid][vehicle] = CreateVehicle(521, pos[0], pos[1], pos[2], pos[3], random(126), random(126), (60*60));
GivePlayerMoney(playerid, -5000000);
vInfo[playerid][model] = 521;
}
}
return true;
}
#endif