29.11.2012, 18:14
I'm trying to create some kind of car system, and the /savecar and stuff works completely, but when i use
/loadcar nothing happens. The only error i get are this one:
These are the only codes involved in this problem:
/loadcar nothing happens. The only error i get are this one:
Код:
C:\Users\9903286\Dropbox\Server\gamemodes\gamemode.pwn(9296) : warning 217: loose indentation
Код:
dcmd_loadcar(playerid, params[])
{
#pragma unused params
new modelid, color1, color2;
LoadPlayerCar(playerid, modelid, color1, color2);
new Float:pX, Float:pY, Float:pZ, Float:pAng;
GetPlayerPos(playerid, pX, pY, pZ);
GetPlayerFacingAngle(playerid, pAng);
CreateVehicle(modelid, pX, pY, pZ, pAng, color1, color2, -1);
return 1;
}
Код:
stock LoadPlayerCar(playerid, modelid, color1, color2)
{
new file[256], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), "%s.car", name);
modelid = dini_Int(file, "Carmodel");
color1 = dini_Int(file, "Color1");
color2 = dini_Int(file, "Color2");
return modelid, color1, color2;
}


