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; }
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;
}
pawn Код:
|
Carmodel=562 Color1=60 Color2=60
new file2[256]; format(file2, sizeof(file), "%s.car", name); if(!fexist(file2)) { dini_Create(file2); dini_IntSet(file2, "Carmodel", 0); dini_IntSet(file2, "Color1", 0); dini_IntSet(file2, "Color2", 0); }
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;
}
PHP код:
{ 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; }[/php] |