Probiere es bitte so: Ersetze die jetzigen gleichnamigen Publics mit denen die ich hier unten im Quellcode angehangen habe.
public DestroyAndCreateFactionCar(fc)
{
if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
{
DestroyVehicle(FactionCars[fc][fCarid]);
FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255);
ReloadGangCarList(FactionCars[fc][fFaction][0]);
#if defined FACTION_CARS_TUNEABLE
if(IsAllowedFactionToTune(FactionCars[fc][fFaction][0]))
{
if(FactionCars[fc][fTuning][0] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][0]); }
if(FactionCars[fc][fTuning][1] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][1]); }
if(FactionCars[fc][fTuning][2] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][2]); }
if(FactionCars[fc][fTuning][3] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][3]); }
if(FactionCars[fc][fTuning][4] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][4]); }
if(FactionCars[fc][fTuning][5] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][5]); }
if(FactionCars[fc][fTuning][6] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][6]); }
if(FactionCars[fc][fTuning][7] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][7]); }
if(FactionCars[fc][fTuning][8] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][8]); }
if(FactionCars[fc][fTuning][9] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][9]); }
if(FactionCars[fc][fTuning][10] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][10]); }
if(FactionCars[fc][fTuning][11] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][11]); }
if(FactionCars[fc][fTuning][12] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][12]); }
if(FactionCars[fc][fTuning][13] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][13]); }
}
#endif
}
return true;
}
public DestroyAndCreateStateFactionCar(fc)
{
if(StateFactionCars[fc][sfVehid] >= 400 && StateFactionCars[fc][sfVehid] <= 611)
{
DestroyVehicle(StateFactionCars[fc][sfCarid]);
StateFactionCars[fc][sfCarid] = CreateVehicle(StateFactionCars[fc][sfVehid],StateFactionCars[fc][sfPos][0],StateFactionCars[fc][sfPos][1],StateFactionCars[fc][sfPos][2],StateFactionCars[fc][sfPos][3],StateFactionCars[fc][sfCol][0],StateFactionCars[fc][sfCol][1],-255);
#if defined STATEFACTION_CARS_TUNEABLE
if(IsAllowedFactionToTune(StateFactionCars[fc][sfFaction][0]))
{
if(StateFactionCars[fc][sfTuning][0] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][0]); }
if(StateFactionCars[fc][sfTuning][1] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][1]); }
if(StateFactionCars[fc][sfTuning][2] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][2]); }
if(StateFactionCars[fc][sfTuning][3] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][3]); }
if(StateFactionCars[fc][sfTuning][4] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][4]); }
if(StateFactionCars[fc][sfTuning][5] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][5]); }
if(StateFactionCars[fc][sfTuning][6] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][6]); }
if(StateFactionCars[fc][sfTuning][7] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][7]); }
if(StateFactionCars[fc][sfTuning][8] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][8]); }
if(StateFactionCars[fc][sfTuning][9] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][9]); }
if(StateFactionCars[fc][sfTuning][10] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][10]); }
if(StateFactionCars[fc][sfTuning][11] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][11]); }
if(StateFactionCars[fc][sfTuning][12] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][12]); }
if(StateFactionCars[fc][sfTuning][13] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][13]); }
}
#endif
}
return true;
}
public LoadFactionCars()
{
if(!fexist(FACTION_CAR_FILE))
{
new File:tfFile=fopen(FACTION_CAR_FILE,io_write);
fclose(tfFile);
}
new File:fFile=fopen(FACTION_CAR_FILE,io_read),Content[1024],fc;
while(fread(fFile,Content) && fc<sizeof(FactionCars))
{
StripNewLine(Content);
sscanf(Content,"dffffdddddddddddddddddddddddd",
FactionCars[fc][fVehid],
FactionCars[fc][fPos][0],
FactionCars[fc][fPos][1],
FactionCars[fc][fPos][2],
FactionCars[fc][fPos][3],
FactionCars[fc][fCol][0],
FactionCars[fc][fCol][1],
FactionCars[fc][fFaction][0],
FactionCars[fc][fFaction][1],
FactionCars[fc][fFaction][2],
FactionCars[fc][fFaction][3],
FactionCars[fc][fFaction][4],
FactionCars[fc][fTuning][0],
FactionCars[fc][fTuning][1],
FactionCars[fc][fTuning][2],
FactionCars[fc][fTuning][3],
FactionCars[fc][fTuning][4],
FactionCars[fc][fTuning][5],
FactionCars[fc][fTuning][6],
FactionCars[fc][fTuning][7],
FactionCars[fc][fTuning][8],
FactionCars[fc][fTuning][9],
FactionCars[fc][fTuning][10],
FactionCars[fc][fTuning][11],
FactionCars[fc][fTuning][12],
FactionCars[fc][fTuning][13],
FactionCars[fc][fPrice],
FactionCars[fc][fAbgeschleppt],
FactionCars[fc][fAbgeschlepptPreis]);
if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
{
FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255);
#if defined FACTION_CARS_TUNEABLE
if(IsAllowedFactionToTune(FactionCars[fc][fFaction][0]))
{
if(FactionCars[fc][fTuning][0] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][0]); }
if(FactionCars[fc][fTuning][1] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][1]); }
if(FactionCars[fc][fTuning][2] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][2]); }
if(FactionCars[fc][fTuning][3] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][3]); }
if(FactionCars[fc][fTuning][4] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][4]); }
if(FactionCars[fc][fTuning][5] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][5]); }
if(FactionCars[fc][fTuning][6] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][6]); }
if(FactionCars[fc][fTuning][7] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][7]); }
if(FactionCars[fc][fTuning][8] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][8]); }
if(FactionCars[fc][fTuning][9] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][9]); }
if(FactionCars[fc][fTuning][10] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][10]); }
if(FactionCars[fc][fTuning][11] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][11]); }
if(FactionCars[fc][fTuning][12] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][12]); }
if(FactionCars[fc][fTuning][13] != 0) { AddVehicleComponent(FactionCars[fc][fCarid],FactionCars[fc][fTuning][13]); }
}
#endif
fc++;
}
}
fclose(fFile);
return printf(" '%d' Fraktionsfahrzeuge wurden geladen & erstellt.",fc);
}
public SaveFactionCars(bool:destroy)
{
if(fexist(FACTION_CAR_FILE))
fremove(FACTION_CAR_FILE);
new File:fFile=fopen(FACTION_CAR_FILE,io_append),Content[1024];
for(new fc;fc<sizeof(FactionCars);fc++)
{
if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
{
format(Content,sizeof(Content),"%d %.3f %.3f %.3f %.3f %03d %03d %02d %02d %02d %02d %02d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\r\n",
FactionCars[fc][fVehid],
FactionCars[fc][fPos][0],
FactionCars[fc][fPos][1],
FactionCars[fc][fPos][2],
FactionCars[fc][fPos][3],
FactionCars[fc][fCol][0],
FactionCars[fc][fCol][1],
FactionCars[fc][fFaction][0],
FactionCars[fc][fFaction][1],
FactionCars[fc][fFaction][2],
FactionCars[fc][fFaction][3],
FactionCars[fc][fFaction][4],
FactionCars[fc][fTuning][0],
FactionCars[fc][fTuning][1],
FactionCars[fc][fTuning][2],
FactionCars[fc][fTuning][3],
FactionCars[fc][fTuning][4],
FactionCars[fc][fTuning][5],
FactionCars[fc][fTuning][6],
FactionCars[fc][fTuning][7],
FactionCars[fc][fTuning][8],
FactionCars[fc][fTuning][9],
FactionCars[fc][fTuning][10],
FactionCars[fc][fTuning][11],
FactionCars[fc][fTuning][12],
FactionCars[fc][fTuning][13],
FactionCars[fc][fPrice],
FactionCars[fc][fAbgeschleppt],
FactionCars[fc][fAbgeschlepptPreis]);
fwrite(fFile,Content);
if(destroy == true)
{
if(DestroyVehicle(FactionCars[fc][fCarid]))
FactionCars[fc][fCarid] = -255;
}
}
}
fclose(fFile);
return true;
}
public LoadStateFactionCars()
{
if(!fexist(STATEFACTION_CAR_FILE))
{
new File:tfFile=fopen(STATEFACTION_CAR_FILE,io_write);
fclose(tfFile);
}
new File:fFile=fopen(STATEFACTION_CAR_FILE,io_read),Content[1024],fc;
while(fread(fFile,Content) && fc<sizeof(StateFactionCars))
{
StripNewLine(Content);
sscanf(Content,"dffffdddddddddddddddddddddddd",
StateFactionCars[fc][sfVehid],
StateFactionCars[fc][sfPos][0],
StateFactionCars[fc][sfPos][1],
StateFactionCars[fc][sfPos][2],
StateFactionCars[fc][sfPos][3],
StateFactionCars[fc][sfCol][0],
StateFactionCars[fc][sfCol][1],
StateFactionCars[fc][sfFaction][0],
StateFactionCars[fc][sfFaction][1],
StateFactionCars[fc][sfFaction][2],
StateFactionCars[fc][sfFaction][3],
StateFactionCars[fc][sfFaction][4],
StateFactionCars[fc][sfTuning][0],
StateFactionCars[fc][sfTuning][1],
StateFactionCars[fc][sfTuning][2],
StateFactionCars[fc][sfTuning][3],
StateFactionCars[fc][sfTuning][4],
StateFactionCars[fc][sfTuning][5],
StateFactionCars[fc][sfTuning][6],
StateFactionCars[fc][sfTuning][7],
StateFactionCars[fc][sfTuning][8],
StateFactionCars[fc][sfTuning][9],
StateFactionCars[fc][sfTuning][10],
StateFactionCars[fc][sfTuning][11],
StateFactionCars[fc][sfTuning][12],
StateFactionCars[fc][sfTuning][13],
StateFactionCars[fc][sfPrice],
StateFactionCars[fc][sfAbgeschleppt],
StateFactionCars[fc][sfAbgeschlepptPreis]);
if(StateFactionCars[fc][sfVehid] >= 400 && StateFactionCars[fc][sfVehid] <= 611)
{
StateFactionCars[fc][sfCarid] = CreateVehicle(StateFactionCars[fc][sfVehid],StateFactionCars[fc][sfPos][0],StateFactionCars[fc][sfPos][1],StateFactionCars[fc][sfPos][2],StateFactionCars[fc][sfPos][3],StateFactionCars[fc][sfCol][0],StateFactionCars[fc][sfCol][1],-255);
enginevar[StateFactionCars[fc][sfCarid]] = 0;
#if defined STATEFACTION_CARS_LOCKABLE
//fLockCar(StateFactionCars[fc][sfCarid]);
StateFactionCars[fc][sfLock] = true;
#endif
#if defined STATEFACTION_CARS_TUNEABLE
if(IsAllowedFactionToTune(StateFactionCars[fc][sfFaction][0]))
{
if(StateFactionCars[fc][sfTuning][0] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][0]); }
if(StateFactionCars[fc][sfTuning][1] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][1]); }
if(StateFactionCars[fc][sfTuning][2] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][2]); }
if(StateFactionCars[fc][sfTuning][3] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][3]); }
if(StateFactionCars[fc][sfTuning][4] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][4]); }
if(StateFactionCars[fc][sfTuning][5] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][5]); }
if(StateFactionCars[fc][sfTuning][6] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][6]); }
if(StateFactionCars[fc][sfTuning][7] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][7]); }
if(StateFactionCars[fc][sfTuning][8] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][8]); }
if(StateFactionCars[fc][sfTuning][9] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][9]); }
if(StateFactionCars[fc][sfTuning][10] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][10]); }
if(StateFactionCars[fc][sfTuning][11] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][11]); }
if(StateFactionCars[fc][sfTuning][12] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][12]); }
if(StateFactionCars[fc][sfTuning][13] != 0) { AddVehicleComponent(StateFactionCars[fc][sfCarid],StateFactionCars[fc][sfTuning][13]); }
}
#endif
fc++;
}
}
fclose(fFile);
return printf(" '%d' Staatsfraktionsautos wurden geladen & erstellt.",fc);
}
public RespawnStateFactionBuylist()
{
for(new fbl;fbl<sizeof(FactionStateBuylist);fbl++)
SetVehicleToRespawn(FactionStateBuylist[fbl][sfbCarid]);
return 1;
}
public RespawnFactionBuylist()
{
for(new fbl;fbl<sizeof(FactionBuylist);fbl++)
SetVehicleToRespawn(FactionBuylist[fbl][fbCarid]);
return 1;
}
public RemoveComponent(vehicleid,componentid)
{
return RemoveVehicleComponent(vehicleid,componentid);
}
public ChangePaintjob(vehicleid,paintjobid)
{
return ChangeVehiclePaintjob(vehicleid,paintjobid);
}
public ChangeColor(vehicleid,color1,color2)
{
return ChangeVehicleColor(vehicleid,color1,color2);
}
public OnGameModeInit()
{
SetGameModeText("German Reallife City");
//dbhandle=mysql_connect(SQL_HOST, SQL_USR, SQL_DB, SQL_PWD);
DisableInteriorEnterExits();
ManualVehicleEngineAndLights();
UsePlayerPedAnims();
Load_Garages();
Load_Haeuser();
Fight_Init();
ResetElevatorQueue();
EnableStuntBonusForAll(false);
Elevator_Initialize();
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
printf(" Staatsfraktionsautohaus am laden.");
LoadStateFactionCars();
#if defined STATEFACTION_CARS_LOCKABLE
//FactionCarsTimer = SetTimer("LockStateFactionCarDoors",1037,true);
#endif
SaveStateFactionCarsTimer = SetTimerEx("SaveStateFactionCars",((1000*60)*15),true,"d",false);
for(new fbl=0;fbl<sizeof(FactionStateBuylist);fbl++)
{
FactionStateBuylist[fbl][sfbCarid] = CreateVehicle(FactionStateBuylist[fbl][sfbVehid],FactionStateBuylist[fbl][sfbX],FactionStateBuylist[fbl][sfbY],FactionStateBuylist[fbl][sfbZ],FactionStateBuylist[fbl][sfbA],-1,-1,-255);
new fblText[128];
format(fblText,sizeof(fblText),"{FFFFFF}|- {FF8200}Staatsfraktionsautohaus{FFFFFF} -|\n{FF8200}Modell:{FFFFFF} %s\n{FF8200}Preis:{FFFFFF} $%i",fCarName[FactionStateBuylist[fbl][sfbVehid]-400],FactionStateBuylist[fbl][sfbPrice]);
FactionStateBuylist[fbl][sfbLabel] = Create3DTextLabel(fblText,0xFFFFFFFF,FactionStateBuylist[fbl][sfbX],FactionStateBuylist[fbl][sfbY],FactionStateBuylist[fbl][sfbZ],15.0,0,true);
Attach3DTextLabelToVehicle(FactionStateBuylist[fbl][sfbLabel],FactionStateBuylist[fbl][sfbCarid],0.0,0.0,0.75);
}
BuylistStateRespawner = SetTimer("RespawnStateFactionBuylist",(1000*60),true);
SetTimer("RespawnStateFactionBuylist",20000,false);
printf(" Staatsfraktionsautohaus geladen.");
printf("--------------------------------------\n");
for(new i=0; i<sizeof(Kaufliste); i++)
{
Kaufliste[i][Carid]=CreateVehicle(Kaufliste[i][Modelid],Kaufliste[i][XX],Kaufliste[i][YY],Kaufliste[i][ZZ],Kaufliste[i][Rotation],-1,-1,-1);
new fblText[128];
format(fblText,sizeof(fblText),"{FF9D00}%s{FEFEFE} steht zum Verkauf\n{FF9D00}Preis:{FEFEFE} $%d\n{FF9D00}Verkäufer:{FEFEFE} Autohaus",Kaufliste[i][Name],Kaufliste[i][Preis]);
Kaufliste[i][fbLabel] = Create3DTextLabel(fblText,0xFFFFFFFF,Kaufliste[i][XX],Kaufliste[i][YY],Kaufliste[i][ZZ],40.0,0,0);
//Attach3DTextLabelToVehicle(Kaufliste[i][fbLabel],Kaufliste[i][Modelid],0.0,0.0,0.75);
Attach3DTextLabelToVehicle(Kaufliste[i][fbLabel], Kaufliste[i][Carid],0.0,0.0,0.75);
}
return 1;
}
}
public OnGameModeExit()
{
foreach (Character,i)
{
gPlayerLogged[i] = 0;
OnPlayerUpdate_(i);
}
for(new v=0; v<MAX_VEHICLES; v++)
{
DestroyVehicle(v);
}
KillTimer(tanktimer);
KillTimer(HalfSecTimer);
KillTimer(SaveFactionCarsTimer);
KillTimer(SaveStateFactionCarsTimer);
//KillTimer(FactionCarsTimer);
SaveFactionCars(true);
KillTimer(BuylistRespawner);
SaveStateFactionCars(true);
KillTimer(BuylistStateRespawner);
for(new fbl;fbl<sizeof(FactionBuylist);fbl++)
{
DestroyVehicle(FactionBuylist[fbl][fbCarid]);
Delete3DTextLabel(FactionBuylist[fbl][fbLabel]);
}
for(new fbl;fbl<sizeof(FactionStateBuylist);fbl++)
{
DestroyVehicle(FactionStateBuylist[fbl][sfbCarid]);
Delete3DTextLabel(FactionStateBuylist[fbl][sfbLabel]);
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(bagmoney[i]>0)
{
DestroyDynamicObject(bagobjects[i]);
DestroyDynamic3DTextLabel(bagtext[i]);
bagmoney[i]=0,bagpos[i][0]=0.0,bagpos[i][1]=0.0,bagpos[i][2]=0.0;
}
Spectating[i][0]=-1;
}
SaveContracts();
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid))return 1;
SetupLoginBilder(playerid);
SetSpawnInfo( playerid,7,264,805.4880,-1343.7689,-0.5078,136.8591,0,0,0,0,0,0);
SpawnPlayer(playerid);
ClearChatbox(playerid, 10);
new pName[MAX_PLAYER_NAME];
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
new string[250];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/SpielerAccount/%s.txt",name);
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "Hallo und Herzlich Willkommen %s", pName);
SendClientMessage(playerid,0xC8C8C833, string);
SendClientMessage(playerid,0xC8C8C833,"Wir freuen uns, dich auf unserem Server gegrüßen zu dürfen");
SendClientMessage(playerid,0xC8C8C833,"Server erstellt Userdaten (Bitte Warten)");
if(dini_Exists(Spielerdatei))
{
new login[MAX_PLAYER_NAME];
SetupLoginBilder(playerid);
GetPlayerName(playerid, login, sizeof(login));
TextDrawShowForPlayer(playerid, RegBalken1);
TextDrawShowForPlayer(playerid, RegBalken2);
TextDrawShowForPlayer(playerid, RegBalken3);
TextDrawShowForPlayer(playerid, RegBalken4);
}
return 1;
}
Alles anzeigen