Ich habe i.wie das Donator Icon obwohl ich kein Donator mehr bin :D, ich will es weg haben ![]()
Beiträge von Weihnachtsmann
-
-
Eine Schleife ist viel einfacher ...
Dein Ansatz ist richtig Gio!
Soll eine Nachricht erscheinen?
Hab bis jetzt so, doch i.wie bekommt Triaden auch Geld obwohl alle Gebiete Ballas hat :s
public GangPayDay()
{
new count,str[128];
for(new Frak = 0; Frak< 26; Frak++){
for(new GB = 0; GB<8; GB++){
if(GangfightSystemInfo[GB][GFOwnerID] == Frak)count++;
}
KassenInfo[Frak][tKasse] += count * 5000;
}
ForAllPlayers(i)
{
if(IsAGangMember(i))
{
format(str,128,"Gebiete: %d\nGeld für die Gebiete: %d$",count,count*5000);
SendClientMessage(i,COLOR_YELLOW,str);
}
}
return 1;
} -
Irgendwo wirst du die Fraktionen ja definiert haben, also auch wissen wieviele es sind. Wenn du schlau bist speicherst du die anzahl in einer Variable, so musst du nicht immer das ganze script umändern sondern nur die Variable.
Im IR Script finde ich es, habe schon eine halbe Stunde gesucht. Das ist echt umständlich gescriptet -
Alles anzeigen
So ungefährt musste es machen, aber natürlich bearbeiten auf deine Funktionen

public GangPayDay()
{
new count; //Ein Zähler um die Fraktionen zu zählen.
for(new FraktionID = 0; FraktionID < /*ANZAHL DER FRAKTIONEN*/; FraktionID++) //Schleife die Alle Fraktionen durchgeht.
{
for(new Gebiet = 0; Gebiet < /*ANZAHL DER GANGWAR-GEBIETE*/; Gebiet++){ //Schleife die Alle GW-Gebiete durchgeht.
if(GehoertGebiet[Gebiet] == FraktionID){ //Abfrage ob das Gebiet der Fraktion gehört
count++; //Wenn ja, wird der Zähler um 1 erhöht. (++ bedeutet +1)
}
}
GibtFraktionGeld(FraktionID,count*5000); // Anzahl der Gebiete (count = Zähler = Anzahl der Gebiete) * 5.000$
}
return 1;
}
Problem ist, wie mache ich eine Schelife der die ganzen Fraktionen durch geht, Gangfightgebiete weiß ich aber Fraktionen
-
public GangPayDay()
{
for(new g = 0; g < sizeof(GangfightSystemInfo); g++)
{
if(GangfightSystemInfo[gOwnerID]
}
return 1;
}ist das bis jetzt richtig? XD weiter komm ich i,wie nicht :s
-
Wie kann ich das scripten, das eine Gang pro Gebiet was die besitzen stündlich 5.000$ in die Gangkasse bekommen? Ich bräuchte bisschen Denkhilfe wie das klappen soll.
Ich benutze ein GF [IR Script]falls das eine Rolle spielt

mfg
-
Hey,
Ich habe ein Problem undzwar, kann man ein Biz beitreten doch i.wie kommt man nicht mehr raus. Ich frage mich wieso, die Koordinaten müssten stimmen!
new BizInfo[MaxBiz][bInfo] =
{
{1,"Staat","Gun Shop SF","Niemand",-2626.4827,209.3238,4.6004,285.6058,-86.0131,1001.5229,5,5000000,0,0,1,4,100000,100000,100,1,0},
{1,"Staat","Gun Shop LS","Niemand",1791.5143,-1164.1787,23.8281,2169.461181,1618.798339,999.976562,5,5000000,0,0,1,1,100000,100000,100,2,0},
{0,"Staat","Restaurant","Niemand",1498.360107,-1583.031860,13.546898,-794.936218,490.632385,1376.195312,5,5000000,0,0,1,1,100,500,100,3,0},
{1,"Staat","LS Polizei Waffenkammer","Niemand",1568.625122,-1690.535766,5.890600,246.376007,109.246002,1003.218811,5,5000000,0,0,0,10,100000,1000000,100,1,0},
{1,"Staat","Bank LS","Niemand",1462.395751,-1012.391174,26.843799,389.3555,173.8684,1008.3828,5,5000000,0,0,0,3,99999,100000,1,1,0},
{1,"Staat","SF Polizei Waffenkammer","Niemand",-1593.8340,716.2302,-5.2422,226.7151,110.9211,1010.2188,5,5000000,0,0,1,10,100000,1000000,100,2,0},
{1,"Staat","LV Polizei Waffenkammer","Niemand",611.0042,-583.9974,17.9763,227.3422,122.0904,1010.2188,5,5000000,0,0,0,10,100000,1000000,100,3,0},
{1,"Staat","Bank SF","Niemand",-1749.3010,867.1620,25.0859,389.3555,173.8684,1008.3828,5,5000000,0,0,0,3,99999,100000,1,2,0},
{1,"Staat","Gesund Fahren mit dem Fahrad verleih","Niemand",1312.5642,-873.9422,39.5781,1312.5642,-873.9422,39.5781,5,5000000,0,0,0,0,99999,100000,1,0,0},
{1,"Staat","Ammu Nation","Niemand",1367.9816,-1279.9513,13.5469,286.148986,-40.644397,1001.515625,5,5000000,0,0,1,1,100000,100000,100,4,0},
{1,"Staat","Gun Shop LV","Niemand",2158.5098,943.0615,10.8203,296.919982,-108.071998,1001.515625,5,5000000,0,0,1,6,100000,100000,100,5,0},
{0,"Staat","Alhambra","Niemand",1834.9247,-1682.5403,13.4112,493.2791,-24.2553,1000.6797,5,5000000,0,0,1,17,500,500,100,2,0},
{0,"Staat","Jizzy","Niemand",-2624.2668,1411.7013,7.0938,-2636.5610,1403.2194,906.4609,5,5000000,0,0,1,3,500,500,100,2,0},
{0,"Staat","Donator Autohaus","Niemand",2200.5083,1394.3988,11.0625,2200.5083,1394.3988,11.0625,5,5000000,0,0,1,0,500,500,100,0,0},
{0,"Staat","Telefon GmbH","Niemand",1382.1464,-1088.7307,28.2098,-2240.3855,137.1735,1035.4141,5,10000000,0,0,1,6,500,500,100,2,0},
{1,"Staat","Ammu Nation Angle Pine","Niemand",-2093.2163,-2464.3862,30.6250,316.524993,-167.706985,999.593750,5,5000000,0,0,1,6,100000,100000,100,8,0},
{1,"Staat","Bank LV","Niemand",938.7953,1733.1140,8.8516,389.3555,173.8684,1008.3828,5,5000000,0,0,0,3,99999,100000,1,3,0}
};
new BizPickup[MaxBiz];
enum bInfo
{
bOwned,
bOwner[MAX_PLAYER_NAME],
bMessage[128],
bExtortion[MAX_PLAYER_NAME],
Float:bEntranceX,
Float:bEntranceY,
Float:bEntranceZ,
Float:bExitX,
Float:bExitY,
Float:bExitZ,
bLevelNeeded,
bBuyPrice,
bEntranceCost,
bTill,
bLocked,
bInterior,
bProducts,
bMaxProducts,
bPriceProd,
bWorld,
bExtortionTill,
};
if(strcmp("/exit", cmd, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerPaintballing[playerid] == 1)
{
ResetPlayerWeapon(playerid);
PlayerPaintballing[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 50);
SetPlayerPos(playerid,SBizInfo[10][sbEntranceX], SBizInfo[10][sbEntranceY], SBizInfo[10][sbEntranceZ]);
return 1;
}
if(PlayerTeamPaintballing[playerid] != 0)
{
if(PlayerTeamPaintballing[playerid] == 1)
{
Team1User--;
}
else if(PlayerTeamPaintballing[playerid] == 2)
{
Team2User--;
}
SetPlayerToTeamColor(playerid);
TextDrawHideForPlayer(playerid,TeamDMDraw);
ResetPlayerWeapon(playerid);
PlayerTeamPaintballing[playerid] = 0;
SetPlayerHealth(playerid, 50);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,SBizInfo[13][sbEntranceX], SBizInfo[13][sbEntranceY], SBizInfo[13][sbEntranceZ]);
return 1;
}
for(new i = 0; i < sizeof(HouseInfo); i++)
{
new i2 = 300+i;
if(PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]) && GetPlayerVirtualWorld(playerid) == i2)
{
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pLocal] = -1;
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
}
for(new i = 0; i < sizeof(GangHausInfo); i++)
{
if(PlayerToPoint(3, playerid, GangHausInfo[i][GHAusgangX], GangHausInfo[i][GHAusgangY], GangHausInfo[i][GHAusgangZ]) && GetPlayerVirtualWorld(playerid) == GangHausInfo[i][GHVirtualWorld])
{
PlayerInfo[playerid][pLocal] = -1;
SetPlayerPos(playerid, GangHausInfo[i][GHEingangX], GangHausInfo[i][GHEingangY], GangHausInfo[i][GHEingangZ]);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerFacingAngle(playerid,GangHausInfo[i][GHEingangAngle]);
return 1;
}
}
for(new i = 0; i < sizeof(BizInfo); i++)
{
if(PlayerToPoint(3, playerid,BizInfo[i][bExitX], BizInfo[i][bExitY], BizInfo[i][bExitZ]) && GetPlayerVirtualWorld(playerid) == BizInfo[i][bWorld])
{
if(i == 4 || i == 7 || i == 16)//Bank LS
{
if(PlayerInfo[playerid][pBankrob] == 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(COLOR_LIGHTBLUE, "Bankraub gescheitert.");
format(string, sizeof(string), "Der Räuber %s hat die Bank verlassen.",sendername);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pBankrob] = 0;
BankrobStatus = 0;
BizInfo[i][bLocked] = 0;
}
}
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pLocal] = -1;
SetPlayerPos(playerid,BizInfo[i][bEntranceX],BizInfo[i][bEntranceY],BizInfo[i][bEntranceZ]);
return 1;
}
}
new newcar = GetPlayerVehicleID(playerid);
for(new SlotID = 0; SlotID < sizeof(RentSystemInfo); SlotID++)
{
if(newcar == RentSystemInfo[SlotID][RSCarID])
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
return 1;
}
}
for(new h=0; h<sizeof(StatdreiniegerAuto); h++)
{
if(GetPlayerVehicleID(playerid) == StatdreiniegerAuto[h])
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
return 1;
}
}
for(new h=0; h<sizeof(RobTransporter); h++)
{
if(GetPlayerVehicleID(playerid) == RobTransporter[h])
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
return 1;
}
}
if(IsATaxiFahrerCar(newcar) || IsABusFahrerCar(newcar))
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
return 1;
}
else if (PlayerToPoint(6.0, playerid,-1404.5299,-259.0602,1043.6563)) // LS
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pLocal] = -1;
SetPlayerPos(playerid,2695.6235,-1704.6960,11.8438);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
else if (PlayerToPoint(8.0, playerid,-1443.0554,-581.1879,1055.0472)) // SF
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pLocal] = -1;
SetPlayerPos(playerid,-2111.5686,-443.9720,38.7344);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
else if (PlayerToPoint(8.0, playerid,-1464.7732,1557.5533,1052.5313)) // SF
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pLocal] = -1;
SetPlayerPos(playerid,-2080.3079,-406.0309,38.7344);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
else if (PlayerToPoint(8.0, playerid,-1410.0507,894.5715,1041.5186))// LV Derby Arena
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pLocal] = -1;
SetPlayerPos(playerid,1099.5665,1601.4880,12.5469);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
else if (PlayerToPoint(8.0, playerid,-1400.8651,928.0172,1041.5313))// LV Derby Arena Zuschauerbühne Port nach Außen
{
SetPlayerInterior(playerid,15);
PlayerInfo[playerid][pLocal] = -1;
SetPlayerPos(playerid,-1400.8357,923.6845,1038.4016);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,1292.7383,2.9610,1001.0127) && GetPlayerVirtualWorld(playerid) == 14)//LSPD Ausgang
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetVehicleVirtualWorld(vid,0);
SetVehiclePos(vid,1586.0304,-1671.7964,6.0852);
SetVehicleZAngle(vid,0.1);
LinkVehicleToInterior(vid,0);
ForAllPlayers(i){
if(IsPlayerConnected(i)){
if(IsPlayerInAnyVehicle(i)){
if(IsPlayerInVehicle(i,vid)){
PlayerInfo[i][pLocal] = -1;
SetPlayerInterior(i,0);
SetPlayerVirtualWorld(i,0);
}}}}
return 1;
}
else
{
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1586.0304,-1671.7964,6.0852);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,1292.7383,2.9610,1001.0127) && GetPlayerVirtualWorld(playerid) == 7)//FBI Ausgang
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetVehicleVirtualWorld(vid,0);
SetVehiclePos(vid,613.7350,-601.7015,16.9346);
SetVehicleZAngle(vid,270.1);
LinkVehicleToInterior(vid,0);
ForAllPlayers(i){
if(IsPlayerConnected(i)){
if(IsPlayerInAnyVehicle(i)){
if(IsPlayerInVehicle(i,vid)){
PlayerInfo[i][pLocal] = -1;
SetPlayerInterior(i,0);
SetPlayerVirtualWorld(i,0);
}}}}
return 1;
}
else
{
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,613.7350,-601.7015,16.9346);
return 1;
}
}
else if (PlayerToPoint(8.0, playerid, -1423.9795,933.9197,1036.2737)) // LV Derby Arena Port nach Außen
{
if(GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -1384.7043,921.1654,1038.5911);
SetVehicleZAngle(tmpcar, 180);
LinkVehicleToInterior(tmpcar, 15);
return 1;
}
else
{
SetPlayerPos(playerid, -1384.7043,921.1654,1038.5911);
}
SetPlayerInterior(playerid,15);
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,1292.7383,2.9610,1001.0127) && GetPlayerVirtualWorld(playerid) == 20)//Medic Ausgang
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetVehicleVirtualWorld(vid,0);
SetVehiclePos(vid,1123.7307,-1327.5610,13.5187);
SetVehicleZAngle(vid,0.1);
LinkVehicleToInterior(vid,0);
ForAllPlayers(i){
if(IsPlayerConnected(i)){
if(IsPlayerInAnyVehicle(i)){
if(IsPlayerInVehicle(i,vid)){
PlayerInfo[i][pLocal] = -1;
SetPlayerInterior(i,0);
SetPlayerVirtualWorld(i,0);
}}}}
return 1;
}
else
{
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1123.7307,-1327.5610,13.5187);
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,1304.1611,-55.4516,1002.5017) && GetPlayerVirtualWorld(playerid) == 20)//Medic Ausgang
{
if(IsPlayerInAnyVehicle(playerid)){
new vid = GetPlayerVehicleID(playerid);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetVehiclePos(vid,-2589.6802,637.6298,14.1581);
SetVehicleZAngle(vid,270.1);
LinkVehicleToInterior(vid,0);
SetVehicleVirtualWorld(vid,0);
ForAllPlayers(i){
if(IsPlayerConnected(i)){
if(IsPlayerInAnyVehicle(i)){
if(IsPlayerInVehicle(i,vid)){
PlayerInfo[i][pLocal] = -1;
SetPlayerInterior(i,0);
SetPlayerVirtualWorld(i,0);
}}}}
return 1;
}
else
{
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2589.6802,637.6298,14.1581);
return 1;
}}}
return 1;
}
if(PlayerInfo[playerid][pMuted] > 0)
{
SendClientMessage(playerid, COLOR_KNALLROT, "SERVER: Du bist Gemutet, du kannst keine Commands Nutzen.!");
return 1;
} -
Alles anzeigen
if (strcmp("/starten", cmd, true) == 0)
{
if(Mullabfuhr[playerid] == 0 && PlayerInfo[playerid][pJob] == 17)
{
if(PlayerInfo[playerid][pMulltime] == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 408 || Mullabfuhr[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "Du bist nun im Dienst, fahre nun zu den einzelnen Häusern und Geschäften!");
SetPlayerCheckpoint(playerid, 1355.6742,-1749.4160,13.3807, 5.0);
MullabfuhrCP[playerid] = 1;
Mullabfuhr[playerid] = 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist nicht im Müllwagen, oder hast bereits eine Runde gestartet!");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du musst warten bis du wieder fahren kannst!");
}
return 1;
}
}Ich habe das Problem wenn man /starten eingibt kann man ohne das man in ein Müllfahrzeug ist Starten und die Checkpoints werden angezeigt kann man das machen das er nur in Müll Fahrzeug sein muss und wenn der Aussteigt das die Checkpoints weg gehen
kennt ihr noch weitere Buggs die im GNE Script sind ? wenn ja würde Sie gerne wissen
Du erstellst Müllautos im Script.
So dann machst du in deinem Befehle eine Schleife, der deine Müllautos durch geht und dann fragst du ab ob der Spieler in einem Müllwagen ist.-So müsste es gehen, wenn ich falsch liege tut es mir leid

-
Ist"PlayerInfo[playerid][pSHealth]" nachm Einloggen größer als 0?
Wo wird wann "MedicBill[playerid] = 1" gesetzt?
Such nach der Koordinate 1198.8Mist, war zu langsam

Zeile 7 in Post-Nr. 7.
Zeile 7 habe ich entfernt und SetPlayerHealth 100 gemacht nun sterbe ich nicht mehr! aber Problem
ist ich habe ja das Upgrade System, wie soll ich das so machen das es klappt :p -
mach mal oben printf("ID: %d HP: %.2f", playerid, PlayerInfo[playerid][pSHealth]);
bei setplayerspawn oder onplayerspawn//unter SetPlayerSpawn kam das raus :o
[20:55:20] Genetikk hat sich eingeloggt. [ID: 1]
[20:55:20] ID: 1 HP: 0.00
[20:55:20] [death] Genetikk died 255
[20:55:24] ID: 1 HP: 0.00
[20:55:24] [death] Genetikk died 255
[20:55:28] ID: 1 HP: 0.00 -
Zeig mal "SetPlayerSpawn"!
MfG Kevin
public SetPlayerSpawn(playerid)
{
new playername[MAX_PLAYER_NAME];
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
SetPlayerHealth(playerid, PlayerInfo[playerid][pSHealth]);
if(PlayerInfo[playerid][pAdminOnDuty] == 1)
{
SetPlayerColor(playerid, COLOR_SUPPORTER);
if(PlayerInfo[playerid][pAdmin] >= 5)
{
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
}
}
if(PlayerInfo[playerid][pChar] != 0)
{
if(IsACop(playerid) && OnDuty[playerid] == 1)
{
SetPlayerSkin(playerid, PlayerInfo[playerid][pOnDutySkin]);
}
else
{
SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
}
}
else
{
Kleidungsshop[playerid] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Du hast einen ungültigen Skin, bitte wähle einen neuen !");
JoinSkinAuswahl(playerid);
return 1;
}
if(PlayerInfo[playerid][pTut] == 0 && PlayerInfo[playerid][pConnectTime] == 0)
{
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
TogglePlayerControllable(playerid, 0);
RegistrationStep[playerid] = 1;
PlayerInfo[playerid][pLocal] = -1;
SendClientMessage(playerid, COLOR_YELLOW, " ");
SendClientMessage(playerid, COLOR_YELLOW, " ");
SendClientMessage(playerid, COLOR_YELLOW, " ");
SendClientMessage(playerid, COLOR_YELLOW, " ");
SendClientMessage(playerid, COLOR_YELLOW, " ");
SendClientMessage(playerid, COLOR_YELLOW, " ");
SendClientMessage(playerid, COLOR_YELLOW, " ");
SendClientMessage(playerid, COLOR_YELLOW, "Herzlich Willkommen !");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Von wem wurdest du geworben? (Wenn dich niemand geworben hat, gib 'Niemand' ein.)");
}
if(PlayerPaintballing[playerid] == 1)
{
new rand = random(sizeof(PaintballSpawns));
SetPlayerVirtualWorld(playerid, 20);
//SetPlayerInterior(playerid, 10);
SetPlayerHealth(playerid, 100);
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
return 1;
}
if(PlayerTeamPaintballing[playerid] != 0)
{
if(PlayerTeamPaintballing[playerid] == 1)
{
SetPlayerInterior(playerid, 10);
new Zufall;
Zufall = random(7);
SetPlayerPos(playerid,TeamDM2[Zufall][0],TeamDM2[Zufall][1],TeamDM2[Zufall][2]);
GivePlayerWeapons(playerid,24,9999);
GivePlayerWeapons(playerid,25,9999);
SetPlayerColor(playerid,SHOWME_COLOR_GRUEN);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
SetCameraBehindPlayer(playerid);
return 1;
}
else if(PlayerTeamPaintballing[playerid] == 2)
{
SetPlayerInterior(playerid, 10);
new Zufall;
Zufall = random(7);
SetPlayerPos(playerid,TeamDM2[Zufall][0],TeamDM2[Zufall][1],TeamDM2[Zufall][2]);
GivePlayerWeapons(playerid,24,9999);
GivePlayerWeapons(playerid,25,9999);
SetPlayerColor(playerid,SHOWME_COLOR_BLAU);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
SetCameraBehindPlayer(playerid);
return 1;
}
}
if(PlayerInfo[playerid][pJailed] != 0)
{
if(PlayerInfo[playerid][pJailed] == 1)
{
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid,198.8241,161.8588,1003.0300);
SendClientMessage(playerid, COLOR_LIGHTRED, " Strafe noch nicht komplett abgesessen, zurück ins Gefängnis.");
}
if(PlayerInfo[playerid][pJailed] == 2)
{
//SetTimerEx("PrisonChecker",20000,0,"i",playerid);
CopPrison(playerid);
SetPlayerInterior(playerid, 1);
PlayerInfo[playerid][pLocal] = -1;
SetPlayerPos(playerid, 2144.1943,1617.5361,993.6882);
SetPlayerFacingAngle(playerid, 270);
SetPlayerSkin(playerid, 206);
}
if(PlayerInfo[playerid][pJailed] == 3)
{
SetPlayerInterior(playerid, 6);
new zufall = random(3);
if(zufall == 1)
{
SetPlayerPos(playerid, 264.3521,82.2144,1001.0391);
}
else if(zufall == 2)
{
SetPlayerPos(playerid, 264.1788,86.7012,1001.0391);
}
else
{
SetPlayerPos(playerid, 264.7485,77.6824,1001.0391);
}
PlayerInfo[playerid][pLocal] = -1;
SendClientMessage(playerid, COLOR_LIGHTRED, " Strafe noch nicht komplett abgesessen, zurück ins Gefängnis.");
SetCameraBehindPlayer(playerid);
}
if(PlayerInfo[playerid][pJailed] == 5)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,-366.9173,-1426.9307,25.7266);
}
ResetPlayerWeapon(playerid);
return 1;
}
if(MedicBill[playerid] > 0 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0 && PlayerTeamPaintballing[playerid] == 0 && PlayerInfo[playerid][pAdminOnDuty] == 0 && FirstSpawnAfterLogin[playerid] == 0 && Logintime[playerid] > 5)
{
if(MedicBill[playerid] == 1) // LS
{
SetPlayerCameraPos(playerid, 1223.379028, -1333.354126, 35.0000);
SetPlayerCameraLookAt(playerid, 1178.824829, -1325.804077, 14.0000);
SetPlayerPos(playerid, 1172.7855,-1323.1859,12.0000);
SetPlayerInterior(playerid, 0);
}
if(MedicBill[playerid] == 2) // SF
{
SetPlayerCameraPos(playerid, -2534.5190,544.7918,67.0804);
SetPlayerCameraLookAt(playerid, -2655.0188,664.8013,27.3573);
SetPlayerPos(playerid, -2655.0188,664.8013,27.3573);
SetPlayerInterior(playerid, 0);
}
if(MedicBill[playerid] == 3) // LV
{
SetPlayerCameraPos(playerid, 1584.8676,1861.9952,29.6722);
SetPlayerCameraLookAt(playerid, 1605.9807,1792.4591,16.3813);
SetPlayerPos(playerid, 1605.9807,1792.4591,16.3813);
SetPlayerInterior(playerid, 0);
}
PlayerStoned[playerid] = 0;
STDPlayer[playerid] = 0;
TogglePlayerControllable(playerid, 0);
SetPlayerHealth(playerid, 100);
MedicBillTimer[playerid] = SetTimerEx("Krankenhaus",26000,0,"i",playerid);
GameTextForPlayer(playerid, "~r~In Krankenhausbehandlung ~n~~y~Ca. 30 Sekunden", 30000, 3);
return 1;
}
if(Kleidungsshop[playerid] == 0)
{
SetPlayerInterior(playerid, 15);
SetPlayerPos(playerid,207.7160,-101.7301,1005.2578);
SetPlayerVirtualWorld(playerid, Kleidungsshop[playerid]);
Kleidungsshop[playerid] = -1;
return 1;
}
if(Kleidungsshop[playerid] == 2)
{
SetPlayerInterior(playerid, 15);
SetPlayerPos(playerid,207.7160,-101.7301,1005.2578);
SetPlayerVirtualWorld(playerid, Kleidungsshop[playerid]);
Kleidungsshop[playerid] = -1;
return 1;
}
else if(Kleidungsshop[playerid] == 1){Kleidungsshop[playerid] = -1;}
SetSpawnKill(playerid);
new house = PlayerInfo[playerid][pPhousekey];
if(house != -1)
{
if(PlayerInfo[playerid][pSpawn] == 1)
{
SetPlayerInterior(playerid,HouseInfo[house][hInt]);
SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]);
new house2 = house + 300;
PlayerInfo[playerid][pLocal] = house2;
SetPlayerVirtualWorld(playerid,house2);
return 1;
}
}
if(PlayerInfo[playerid][pMember] != -1 || PlayerInfo[playerid][pLeader] != -1)
{
for(new i = 0; i < sizeof(GangHausInfo); i++){
if(GangHausInfo[i][GHGangID] == PlayerInfo[playerid][pLeader] || GangHausInfo[i][GHGangID] == PlayerInfo[playerid][pMember]){
SetPlayerVirtualWorld(playerid, GangHausInfo[i][GHVirtualWorld]);
SetPlayerInterior(playerid, GangHausInfo[i][GHInterior]);
SetPlayerPos(playerid, GangHausInfo[i][GHAusgangX], GangHausInfo[i][GHAusgangY], GangHausInfo[i][GHAusgangZ]);
PlayerInfo[playerid][pLocal] = i+200;
return 1;
}
}
}
if(IsAnArmy(playerid))// Feuerwehr Spawn
{
SetPlayerPos(playerid, 2122.4863,-2445.1914,13.5469);
SetPlayerInterior(playerid,0);
SetCameraBehindPlayer(playerid);
return 1;
}
else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)// LV-PD Spawn
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2281.363,2429.482,2.844);
SetCameraBehindPlayer(playerid);
return 1;
}
else if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)// FBI Spawn
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 610.4819,-590.9386,17.2266);
SetCameraBehindPlayer(playerid);
return 1;
}
else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)// Medic Spawn
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1143.0281,-1331.4502,13.6165);
SetCameraBehindPlayer(playerid);
return 1;
}
else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)// LSPD Spawn
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1528.456,-1678.284,5.464);
SetCameraBehindPlayer(playerid);
return 1;
}
else if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)//Fahrschule Spawn
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -1346.4974,491.0725,11.2027);
SetCameraBehindPlayer(playerid);
return 1;
}
else if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)// SFPD Spawn
{
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 0);
SetPlayerPos(playerid, -1605.8334,675.3344,-5.2422);
SetCameraBehindPlayer(playerid);
return 1;
}
else
{
if(PlayerInfo[playerid][pOrigin] == 1)//Los Santos
{
SetPlayerPos(playerid,409.4768,-1544.3208,32.2734);
SetPlayerFacingAngle(playerid,0.0);
SetPlayerInterior(playerid,0);
SetCameraBehindPlayer(playerid);
}
else if(PlayerInfo[playerid][pOrigin] == 2)//San Fierro
{
SetPlayerPos(playerid,-1968.8335,137.8044,27.6875);
SetPlayerFacingAngle(playerid,90.0);
SetPlayerInterior(playerid,0);
SetCameraBehindPlayer(playerid);
}
else if(PlayerInfo[playerid][pOrigin] == 3)//Las Venturas
{
SetPlayerPos(playerid,2226.127,1840.507,10.384);
SetPlayerFacingAngle(playerid,90.0);
SetPlayerInterior(playerid,0);
SetCameraBehindPlayer(playerid);
}
else
{
SetPlayerPos(playerid,1110.1477,-1796.8231,16.5938);
SetPlayerFacingAngle(playerid,0.0);
SetPlayerInterior(playerid,0);
SetCameraBehindPlayer(playerid);
}
return 1;
}
}
return 1;
} -
Ja schick mal bitte
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)){
PlayerInfo[playerid][pCarLic] = 1;
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
SetPlayerToTeamColor(playerid);
if(strcmp(botname, "Manfred", true) == 0){
SetPlayerSkin(playerid,6);
SetPlayerVirtualWorld(playerid,0);
PutPlayerInVehicle(playerid, BotCarManfred, 0);
}
if(strcmp(botname, "Dirk", true) == 0){
SetPlayerSkin(playerid,6);
SetPlayerVirtualWorld(playerid,0);
PutPlayerInVehicle(playerid, BotCarDirk, 0);
}
if(strcmp(botname, "Mark", true) == 0){
SetPlayerSkin(playerid,6);
SetPlayerVirtualWorld(playerid,0);
PutPlayerInVehicle(playerid, BotCarMark, 0);
}
if(strcmp(botname, "Dustin", true) == 0){
SetPlayerSkin(playerid, 292);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid, 409.4768,-1544.3208,32.2734);
SetPlayerFacingAngle(playerid,0);
}
return 1;
}
Tot[playerid] = 0;
PlayerInfo[playerid][pLocal] = -1;
SetPlayerPos(playerid,1110.1477,-1796.8231,16.5938);
SetPlayerHealth(playerid, 100);
TextDrawHideForPlayer(playerid, Tacho[playerid]);
TextDrawHideForPlayer(playerid, AntiAFK[playerid]);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerToTeamColor(playerid);
SetCameraBehindPlayer(playerid);
SetPlayerSpawn(playerid);
SetPlayerWeapons(playerid);
if(!gPlayerAnimLibsPreloaded[playerid]){
PreloadAnimLib(playerid,"BOMBER");
PreloadAnimLib(playerid,"RAPPING");
PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"SMOKING");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"ON_LOOKERS");
PreloadAnimLib(playerid,"DEALER");
PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"CARRY");
PreloadAnimLib(playerid,"COP_AMBIENT");
PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE");
PreloadAnimLib(playerid,"FOOD");
gPlayerAnimLibsPreloaded[playerid] = 1;
}
//NO-DM Zonen
for(new i = 0; i < sizeof(NODMZonenInfo); i++){GangZoneShowForPlayer(playerid, NODMZonenInfo[i][NODMZoneID], COLOR_WHITE);}
//NO-DM Zonen Ende
/*Gangzonen*/
//GangZoneShowForPlayer(playerid, LCNBase, GANGCOLOR_LCN);
GangZoneShowForPlayer(playerid, TriadenBase, GANGCOLOR_RIFA);
//GangZoneShowForPlayer(playerid, RedSoldiersBase, GANGCOLOR_REDSOLDIER);
GangZoneShowForPlayer(playerid, BallasBase, GANGCOLOR_BALLAS);
//GangZoneShowForPlayer(playerid, VagosBase, GANGCOLOR_VAGOS);
//GangZoneShowForPlayer(playerid, CamoraBase, GANGCOLOR_CAMORA);
GangZoneShowForPlayer(playerid, YakuzaBase, GANGCOLOR_YAKUZA);
//GangZoneShowForPlayer(playerid, AtztecasBase, GANGCOLOR_ATZTECAS);
GangZoneShowForPlayer(playerid, GroveStreetBase, GANGCOLOR_GROVESTREET);
//GangZoneShowForPlayer(playerid, CaliKartell, GANGCOLOR_KARTEL);
/*Gangfight*/
for(new i = 0; i < sizeof(GangfightSystemInfo); i++){
new GANGZONE_COLOR;
if(GangfightSystemInfo[i][GFOwnerID] == 5) { GANGZONE_COLOR = GANGCOLOR_LCN; }
if(GangfightSystemInfo[i][GFOwnerID] == 6) { GANGZONE_COLOR = GANGCOLOR_YAKUZA; }
if(GangfightSystemInfo[i][GFOwnerID] == 17) { GANGZONE_COLOR = GANGCOLOR_CAMORA; }
if(GangfightSystemInfo[i][GFOwnerID] == 18) { GANGZONE_COLOR = GANGCOLOR_ATZTECAS; }
if(GangfightSystemInfo[i][GFOwnerID] == 19) { GANGZONE_COLOR = GANGCOLOR_GROVESTREET; }
if(GangfightSystemInfo[i][GFOwnerID] == 20) { GANGZONE_COLOR = GANGCOLOR_BALLAS; }
if(GangfightSystemInfo[i][GFOwnerID] == 22) { GANGZONE_COLOR = GANGCOLOR_RIFA; }
if(GangfightSystemInfo[i][GFOwnerID] == 23) { GANGZONE_COLOR = GANGCOLOR_REDSOLDIER; }
if(GangfightSystemInfo[i][GFOwnerID] == 24) { GANGZONE_COLOR = GANGCOLOR_VAGOS; }
if(GangfightSystemInfo[i][GFOwnerID] == 25) { GANGZONE_COLOR = GANGCOLOR_GUERILLA; }
if(GangfightSystemInfo[i][GFOwnerID] == 26) { GANGZONE_COLOR = GANGCOLOR_KARTEL; }
GangZoneShowForPlayer(playerid, GangfightSystemInfo[i][GFGangZoneID], GANGZONE_COLOR);
if(GangfightSystemInfo[i][GFGegnerID] != -1){
if(GangfightSystemInfo[i][GFGegnerID] == 5) { GANGZONE_COLOR = GANGCOLOR_LCN; }
if(GangfightSystemInfo[i][GFGegnerID] == 6) { GANGZONE_COLOR = GANGCOLOR_YAKUZA; }
if(GangfightSystemInfo[i][GFGegnerID] == 17) { GANGZONE_COLOR = GANGCOLOR_CAMORA; }
if(GangfightSystemInfo[i][GFGegnerID] == 18) { GANGZONE_COLOR = GANGCOLOR_ATZTECAS; }
if(GangfightSystemInfo[i][GFGegnerID] == 19) { GANGZONE_COLOR = GANGCOLOR_GROVESTREET; }
if(GangfightSystemInfo[i][GFGegnerID] == 20) { GANGZONE_COLOR = GANGCOLOR_BALLAS; }
if(GangfightSystemInfo[i][GFGegnerID] == 22) { GANGZONE_COLOR = GANGCOLOR_RIFA; }
if(GangfightSystemInfo[i][GFGegnerID] == 23) { GANGZONE_COLOR = GANGCOLOR_REDSOLDIER; }
if(GangfightSystemInfo[i][GFGegnerID] == 24) { GANGZONE_COLOR = GANGCOLOR_VAGOS; }
if(GangfightSystemInfo[i][GFGegnerID] == 25) { GANGZONE_COLOR = GANGCOLOR_GUERILLA; }
if(GangfightSystemInfo[i][GFGegnerID] == 26) { GANGZONE_COLOR = GANGCOLOR_KARTEL; }
GangZoneFlashForPlayer(playerid, GangfightSystemInfo[i][GFGangZoneID], GANGZONE_COLOR);
}}
//Gangzonen Ende
if(FirstSpawnAfterLogin[playerid] == 1){
if(PlayerInfo[playerid][pWantedLevel] > 0){
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && IsACop(i) && OnDuty[i] == 1){
format(string, sizeof(string), "%s( %d )\nWanted Level: %d\nGrund: %s\nDM-Rate: %0.2f", playername,playerid, PlayerInfo[playerid][pWantedLevel], PlayerCrime[playerid][pAccusedof],Float:PlayerInfo[playerid][psKills]/Float:PlayerInfo[playerid][pConnectTime]);
WantedLabel[playerid][i] = CreatePlayer3DTextLabel(i, string, COLOR_KNALLROT, 0.0, 0.0, 1.0, 50.0, playerid, INVALID_VEHICLE_ID, 1);
}}}}
FirstSpawnAfterLogin[playerid] = 0;
return 1;
} -
ohne Code nichs los
Ja, welchen Code? OnPlayerSpawn? -
Ich sterbe immer wieder, wenn ich Spawne? wo könnte der Fehler liegen? benutze ein GF (IR).
Hab mal paar Screens von den Coordinaten, die ich beim sterben habe.
http://www.imagebanana.com/view/f84iizja/samp053.png
http://www.imagebanana.com/view/q8v0eega/samp054.png
Ich habe den Spawn schon so oft geändert, trotzdem stirbt man immer wieder. Außerdem habe ich es mit 100HP beim spawnen versucht, kein Erfolgt :(.
-
Deinem Kollegen habe Ich schon etwas zu dem Problem mit dem Sterben geschrieben.
Mit freundlichen Grüßen
KevinJo aber ingame kommt dann eine Message mit , , oder so aber keine zahlen
-
Alles anzeigen
...
MySQL-Speicherung? Ja, oder?format(endstring, sizeof(endstring), "UPDATE `users` SET ");
format(var, sizeof(var), "`CarSkill`='%d', ", PlayerInfo[playerid][pCarSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`NewsSkill`='%d', ", PlayerInfo[playerid][pNewsSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`DrugsSkill`='%d', ", PlayerInfo[playerid][pDrugsSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`CookSkill`='%d', ", PlayerInfo[playerid][pCookSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`FishSkill`='%d', ", PlayerInfo[playerid][pFishSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`pSHealth`='%.1f', ", PlayerInfo[playerid][pSHealth]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`PhoneNr`='%d', ", PlayerInfo[playerid][pNummer]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`House`='%d', ", PlayerInfo[playerid][pPhousekey]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Biz`='%d', ", PlayerInfo[playerid][pBizKey]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`CarLic`='%d', ", PlayerInfo[playerid][pCarLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`FlyLic`='%d', ", PlayerInfo[playerid][pFlyLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`BoatLic`='%d', ", PlayerInfo[playerid][pBoatLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`FishLic`='%d', ", PlayerInfo[playerid][pFishLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`GunLic`='%d', ", PlayerInfo[playerid][pGunLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), " WHERE `Name`='%s'", playername);
strcat(endstring, var, sizeof(endstring));
self_mysql_query(endstring);Finde den Fehler in Zeile 28.
Oder hast du da aufgehört mit dem Posten? (Hast ja geschrieben, dass das nur teilweise rauskopiert wurde)Schon einmal mit mysql_debug probiert?
Existieren diese Felder in der Datenbank?
self_mysql_get_field("CarLic", val); PlayerInfo[playerid][pCarLic] = strval( val );
self_mysql_get_field("FlyLic", val); PlayerInfo[playerid][pFlyLic] = strval( val );
self_mysql_get_field("BoatLic", val); PlayerInfo[playerid][pBoatLic] = strval( val );
self_mysql_get_field("FishLic", val); PlayerInfo[playerid][pFishLic] = strval( val );
self_mysql_get_field("GunLic", val); PlayerInfo[playerid][pGunLic] = strval( val );
self_mysql_get_field("BikeLic", val); PlayerInfo[playerid][pBikeLic] = strval( val );
self_mysql_get_field("LKWLic", val); PlayerInfo[playerid][pLKWLic] = strval( val );Mit freundlichen Grüßen
Kevin
Der Fehler in Zeile 28 erklärt auch das Biz-Problem. (Anderer Thread von dir!)
Ich dank dir ehrlichen, das du uns so behilflich bist <3. Das Script ist echt komisch (Sricpttechnisch). Doch nur ein Problem noch, man stirbt wenn man am Spawn spawnt obwohl ich den Spawn jetzt geändert habe, stirbt man trotzdem -
Wie wäre es wenn du sie dann mal hinzufügst...Man findet nur das.
Zu deinem anderem Problem brauchen wir auch den Code
Welchen Code? also von OnPlayerSpawn oder what
-
Poste doch gleich den Code um so schneller geht es.
public OnPlayerLogin(playerid)
{
RemoveBuildings(playerid);
new tmp[256],
string[450],
sendername[MAX_PLAYER_NAME];
new Beschwerden = 0;
//new LoginChecker;
getdate(Jahr, Monat, Tag);
gettime(Stunde, Minute, Sekunde);
GetPlayerName(playerid, sendername, sizeof(sendername)); //Wir Speichern den Namen des Spielers in der Variable [i]SpielerInfo[playerid][pName][/i]
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))//Wir fragen ab ob der angegebene Spieler auch Online ist, und kein NPC ist (nur zur sicherhheit)
{
format(string, sizeof(string),"SELECT * FROM `users` WHERE `Name` = '%s'", sendername);
mysql_query(string);//wir holen uns alles aus der tabelle "tabelle_mit_den_haeusern"
mysql_store_result();//speichern dann das ergebniss
new val[ 256 ];
while(mysql_fetch_row_format(string,"|"))
{
self_mysql_get_field("Level", val); PlayerInfo[playerid][pLevel] = strval( val );
self_mysql_get_field("AdminLevel", val); PlayerInfo[playerid][pAdmin] = strval( val );
self_mysql_get_field("DonateRank", val); PlayerInfo[playerid][pDonatorRank] = strval( val );
self_mysql_get_field("UpgradePoints", val); PlayerInfo[playerid][gPupgrade] = strval( val );
self_mysql_get_field("ConnectedTime", val); PlayerInfo[playerid][pConnectTime] = strval( val );
self_mysql_get_field("Registered", val); PlayerInfo[playerid][pReg] = strval( val );
self_mysql_get_field("Sex", val); PlayerInfo[playerid][pSex] = strval( val );
self_mysql_get_field("Age", val); PlayerInfo[playerid][pAlter] = strval( val );
self_mysql_get_field("Origin", val); PlayerInfo[playerid][pOrigin] = strval( val );
self_mysql_get_field("Muted", val); PlayerInfo[playerid][pMuted] = strval( val );
self_mysql_get_field("Respect", val); PlayerInfo[playerid][pRespekt] = strval( val );
self_mysql_get_field("Money", val); PlayerInfo[playerid][pCash] = strval( val );
self_mysql_get_field("Bank", val); PlayerInfo[playerid][pBank] = strval( val );
self_mysql_get_field("Allowed", val); PlayerInfo[playerid][pAllowed] = strval( val );
self_mysql_get_field("bankfach1", val); PlayerInfo[playerid][pBankFach1] = strval( val );
self_mysql_get_field("bankfach2", val); PlayerInfo[playerid][pBankFach2] = strval( val );
self_mysql_get_field("bankfach3", val); PlayerInfo[playerid][pBankFach3] = strval( val );
self_mysql_get_field("bankfach4", val); PlayerInfo[playerid][pBankFach4] = strval( val );
self_mysql_get_field("wgs", val); PlayerInfo[playerid][pwgs] = strval( val );
self_mysql_get_field("facherlaubis", val); PlayerInfo[playerid][pfacherlaubis] = strval( val );
self_mysql_get_field("Crimes", val); PlayerInfo[playerid][pCrimes] = strval( val );
self_mysql_get_field("Kills", val); PlayerInfo[playerid][pKills] = strval( val );
self_mysql_get_field("sKills", val); PlayerInfo[playerid][psKills] = strval( val );
self_mysql_get_field("Deaths", val); PlayerInfo[playerid][pDeaths] = strval( val );
self_mysql_get_field("Arrested", val); PlayerInfo[playerid][pArrested] = strval( val );
self_mysql_get_field("ArrestTime", val); PlayerInfo[playerid][pArrestTime] = strval( val );
self_mysql_get_field("PhoneBook", val); PlayerInfo[playerid][pPhoneBook] = strval( val );
self_mysql_get_field("LottoNr", val); PlayerInfo[playerid][pLottoNr] = strval( val );
self_mysql_get_field("Fishes", val); PlayerInfo[playerid][pFishes] = strval( val );
self_mysql_get_field("BiggestFish", val); PlayerInfo[playerid][pBiggestFish] = strval( val );
self_mysql_get_field("Job", val); PlayerInfo[playerid][pJob] = strval( val );
self_mysql_get_field("Paycheck", val); PlayerInfo[playerid][pPayCheck] = strval( val );
self_mysql_get_field("HeadValue", val); PlayerInfo[playerid][pHeadValue] = strval( val );
self_mysql_get_field("Jailed", val); PlayerInfo[playerid][pJailed] = strval( val );
self_mysql_get_field("JailTime", val); PlayerInfo[playerid][pJailTime] = strval( val );
self_mysql_get_field("Leader", val); PlayerInfo[playerid][pLeader] = strval( val );
self_mysql_get_field("Member", val); PlayerInfo[playerid][pMember] = strval( val );
self_mysql_get_field("Rank", val); PlayerInfo[playerid][pRank] = strval( val );
self_mysql_get_field("Skin", val); PlayerInfo[playerid][pChar] = strval( val );
self_mysql_get_field("Vertragszeit", val); PlayerInfo[playerid][pVertragszeit] = strval( val );
self_mysql_get_field("DetSkill", val); PlayerInfo[playerid][pDetSkill] = strval( val );
self_mysql_get_field("SexSkill", val); PlayerInfo[playerid][pSexSkill] = strval( val );
self_mysql_get_field("LawSkill", val); PlayerInfo[playerid][pAnwaltSkill] = strval( val );
self_mysql_get_field("MechSkill", val); PlayerInfo[playerid][pMechSkill] = strval( val );
self_mysql_get_field("JackSkill", val); PlayerInfo[playerid][pJackSkill] = strval( val );
self_mysql_get_field("CarSkill", val); PlayerInfo[playerid][pCarSkill] = strval( val );
self_mysql_get_field("NewsSkill", val); PlayerInfo[playerid][pNewsSkill] = strval( val );
self_mysql_get_field("DrugsSkill", val); PlayerInfo[playerid][pDrugsSkill] = strval( val );
self_mysql_get_field("CookSkill", val); PlayerInfo[playerid][pCookSkill] = strval( val );
self_mysql_get_field("FishSkill", val); PlayerInfo[playerid][pFishSkill] = strval( val );
self_mysql_get_field("pSHealth", val); PlayerInfo[playerid][pSHealth] = floatstr( val );
self_mysql_get_field("PhoneNr", val); PlayerInfo[playerid][pNummer] = strval( val );
self_mysql_get_field("House", val); PlayerInfo[playerid][pPhousekey] = strval( val );
self_mysql_get_field("Biz", val); PlayerInfo[playerid][pBizKey] = strval( val );
self_mysql_get_field("CarLic", val); PlayerInfo[playerid][pCarLic] = strval( val );
self_mysql_get_field("FlyLic", val); PlayerInfo[playerid][pFlyLic] = strval( val );
self_mysql_get_field("BoatLic", val); PlayerInfo[playerid][pBoatLic] = strval( val );
self_mysql_get_field("FishLic", val); PlayerInfo[playerid][pFishLic] = strval( val );
self_mysql_get_field("GunLic", val); PlayerInfo[playerid][pGunLic] = strval( val );
self_mysql_get_field("Gun1", val); PlayerInfo[playerid][pGun1] = strval( val );
self_mysql_get_field("Gun2", val); PlayerInfo[playerid][pGun2] = strval( val );
self_mysql_get_field("Gun3", val); PlayerInfo[playerid][pGun3] = strval( val );
self_mysql_get_field("Gun4", val); PlayerInfo[playerid][pGun4] = strval( val );
self_mysql_get_field("Ammo1", val); PlayerInfo[playerid][pAmmo1] = strval( val );
self_mysql_get_field("Ammo2", val); PlayerInfo[playerid][pAmmo2] = strval( val );
self_mysql_get_field("Ammo3", val); PlayerInfo[playerid][pAmmo3] = strval( val );
self_mysql_get_field("Ammo4", val); PlayerInfo[playerid][pAmmo4] = strval( val );
self_mysql_get_field("CarTime", val); PlayerInfo[playerid][pCarTime] = strval( val );
self_mysql_get_field("PayDay", val); PlayerInfo[playerid][pPayDay] = strval( val );
self_mysql_get_field("PayDayHad", val); PlayerInfo[playerid][pPayDayHad] = strval( val );
self_mysql_get_field("CDPlayer", val); PlayerInfo[playerid][pCDPlayer] = strval( val );
self_mysql_get_field("AlcoholPerk", val); PlayerInfo[playerid][pAlcoholPerk] = strval( val );
self_mysql_get_field("DrugPerk", val); PlayerInfo[playerid][pDrugPerk] = strval( val );
self_mysql_get_field("MiserPerk", val); PlayerInfo[playerid][pMiserPerk] = strval( val );
self_mysql_get_field("TraderPerk", val); PlayerInfo[playerid][pTraderPerk] = strval( val );
self_mysql_get_field("PainKillerPerk", val); PlayerInfo[playerid][pPainKillerPerk] = strval( val );
self_mysql_get_field("Tutorial", val); PlayerInfo[playerid][pTut] = strval( val );
self_mysql_get_field("Warnings", val); PlayerInfo[playerid][pWarns] = strval( val );
self_mysql_get_field("Fuel", val); PlayerInfo[playerid][pFuel] = strval( val );
self_mysql_get_field("Married", val); PlayerInfo[playerid][pMarried] = strval( val );
self_mysql_get_field("MarriedTo", val); strmid(PlayerInfo[playerid][pMarriedTo], val, 0, strlen(val), 255);
self_mysql_get_field("WantedLevel", val); PlayerInfo[playerid][pWantedLevel] = strval( val );
self_mysql_get_field("Spawn", val); PlayerInfo[playerid][pSpawn] = strval( val );
self_mysql_get_field("SavedMaterials", val); PlayerInfo[playerid][pSaveMats] = strval( val );
self_mysql_get_field("SavedDrugs", val); PlayerInfo[playerid][pSaveDrugs] = strval( val );
self_mysql_get_field("SaveCodes", val); PlayerInfo[playerid][pSaveCodes] = strval( val );
self_mysql_get_field("BikeLic", val); PlayerInfo[playerid][pBikeLic] = strval( val );
self_mysql_get_field("LKWLic", val); PlayerInfo[playerid][pLKWLic] = strval( val );
self_mysql_get_field("DonatorTime", val); PlayerInfo[playerid][pDonatorZeit] = strval( val );
self_mysql_get_field("WerberName", val); strmid(PlayerInfo[playerid][pWerberName], val, 0, strlen(val), 255);
self_mysql_get_field("FightingStyle", val); PlayerInfo[playerid][pFightingStyle] = strval( val );
self_mysql_get_field("Handy", val); PlayerInfo[playerid][pHandy] = strval( val );
self_mysql_get_field("OnDutySkin", val); PlayerInfo[playerid][pOnDutySkin] = strval( val );
self_mysql_get_field("CarLicPoints", val); PlayerInfo[playerid][pCarLicPoints] = strval( val );
self_mysql_get_field("BikeLicPoints", val); PlayerInfo[playerid][pBikeLicPoints] = strval( val );
self_mysql_get_field("InviteSperre", val); PlayerInfo[playerid][pInviteSperre] = strval( val );
self_mysql_get_field("warntime1", val); PlayerInfo[playerid][pWarnTime1] = strval( val );
self_mysql_get_field("warntime2", val); PlayerInfo[playerid][pWarnTime2] = strval( val );
self_mysql_get_field("Ticketsopen", val); PlayerInfo[playerid][pTicketsopen] = strval( val );
self_mysql_get_field("OldName", val); strmid(PlayerInfo[playerid][pOldName], val, 0, strlen(val), 255);
self_mysql_get_field("OrgMember", val); PlayerInfo[playerid][pOrgaID] = strval( val );
self_mysql_get_field("OrgLeader", val); PlayerInfo[playerid][pOrgaLeader] = strval( val );
self_mysql_get_field("OrgName", val); strmid(PlayerInfo[playerid][pOrgaName], val, 0, strlen(val), 255);
self_mysql_get_field("SQLid", val); PlayerInfo[playerid][pSQLID] = strval( val );
self_mysql_get_field("OPBeschwerden", val); Beschwerden = strval( val );
mysql_free_result();
}
}
public OnPlayerRegister(playerid, password[])
{
StuffInfo[sNeuUser] += 1;
if(IsPlayerConnected(playerid))
{
new string[128],
playername[MAX_PLAYER_NAME];GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s", password);
strmid(PlayerInfo[playerid][pKey], string, 0, strlen(string), 255);
//PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash];
//#if defined MySQLSpeicherung
format(string, sizeof(string), "INSERT INTO `users` (`Name`, `Key`) VALUES ('%s', '%s')", playername, PlayerInfo[playerid][pKey]);
self_mysql_query(string);
format(string, sizeof(string), "UPDATE `users` SET `RegisterDatum`='%d' WHERE `Name`='%s'", Time(), playername);
self_mysql_query(string);
PlayerUpdate(playerid);
//PlayerCarUpdate(playerid);
//#else
format(string, sizeof(string), "user/%s.ini", playername);
new File: hFile = fopen(string, io_write);
if (hFile)
{
new var[32];
format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
format(var, 32, "DonateRank=%d\n",PlayerInfo[playerid][pDonatorRank]);fwrite(hFile, var);
format(var, 32, "UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
format(var, 32, "Age=%d\n",PlayerInfo[playerid][pAlter]);fwrite(hFile, var);
format(var, 32, "Origin=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
format(var, 32, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
format(var, 32, "Respect=%d\n",PlayerInfo[playerid][pRespekt]);fwrite(hFile, var);
format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pBank]);fwrite(hFile, var);
format(var, 32, "Allowed=%d\n",PlayerInfo[playerid][pAllowed]);fwrite(hFile, var);
format(var, 32, "bankfach1=%d\n",PlayerInfo[playerid][pBankFach1]);fwrite(hFile, var);
format(var, 32, "bankfach2=%d\n",PlayerInfo[playerid][pBankFach2]);fwrite(hFile, var);
format(var, 32, "bankfach3=%d\n",PlayerInfo[playerid][pBankFach3]);fwrite(hFile, var);
format(var, 32, "bankfach4=%d\n",PlayerInfo[playerid][pBankFach4]);fwrite(hFile, var);
format(var, 32, "wgs=%d\n",PlayerInfo[playerid][pwgs]);fwrite(hFile, var);
format(var, 32, "facherlaubis=%d\n",PlayerInfo[playerid][pfacherlaubis]);fwrite(hFile, var);format(var, 32, "Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
format(var, 32, "sKills=%d\n",PlayerInfo[playerid][psKills]);fwrite(hFile, var);
format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
format(var, 32, "Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
format(var, 32, "ArrestTime=%d\n",PlayerInfo[playerid][pArrestTime]);fwrite(hFile, var);
format(var, 32, "PhoneBook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
format(var, 32, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
format(var, 32, "Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
format(var, 32, "BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
format(var, 32, "HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
format(var, 32, "Materials=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
format(var, 32, "Drugs=%d\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
format(var, 32, "Skin=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
format(var, 32, "Vertragszeit=%d\n",PlayerInfo[playerid][pVertragszeit]);fwrite(hFile, var);
format(var, 32, "DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
format(var, 32, "SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
format(var, 32, "LawSkill=%d\n",PlayerInfo[playerid][pAnwaltSkill]);fwrite(hFile, var);
format(var, 32, "MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
format(var, 32, "JackSkill=%d\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
format(var, 32, "CarSkill=%d\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
format(var, 32, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
format(var, 32, "DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
format(var, 32, "CookSkill=%d\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
format(var, 32, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
format(var, 32, "pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
format(var, 32, "Local=%d\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pNummer]);fwrite(hFile, var);
format(var, 32, "House=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
format(var, 32, "Biz=%d\n",PlayerInfo[playerid][pBizKey]);fwrite(hFile, var);
format(var, 32, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
format(var, 32, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
format(var, 32, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
format(var, 32, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
format(var, 32, "Gun1=%d\n",PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
format(var, 32, "Gun2=%d\n",PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
format(var, 32, "Gun3=%d\n",PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
format(var, 32, "Gun4=%d\n",PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
format(var, 32, "Ammo1=%d\n",PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
format(var, 32, "Ammo2=%d\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
format(var, 32, "Ammo3=%d\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
format(var, 32, "Ammo4=%d\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
format(var, 32, "CarTime=%d\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
format(var, 32, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
format(var, 32, "PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
format(var, 32, "CDPlayer=%d\n",PlayerInfo[playerid][pCDPlayer]);fwrite(hFile, var);
format(var, 32, "AlcoholPerk=%d\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
format(var, 32, "PainKillerPerk=%d\n",PlayerInfo[playerid][pPainKillerPerk]);fwrite(hFile,var);
format(var, 32, "DrugPerk=%d\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
format(var, 32, "MiserPerk=%d\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
format(var, 32, "TraderPerk=%d\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
format(var, 32, "Fuel=%d\n",PlayerInfo[playerid][pFuel]);fwrite(hFile, var);
format(var, 32, "Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
format(var, 32, "MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
format(var, 32, "WantedLevel=%d\n",PlayerInfo[playerid][pWantedLevel]);fwrite(hFile, var);
format(var, 32, "Spawn=%d\n",PlayerInfo[playerid][pSpawn]);fwrite(hFile, var);
format(var, 32, "SavedMaterials=%d\n",PlayerInfo[playerid][pSaveMats]);fwrite(hFile, var);
format(var, 32, "SavedDrugs=%d\n",PlayerInfo[playerid][pSaveDrugs]);fwrite(hFile, var);
format(var, 32, "BikeLic=%d\n",PlayerInfo[playerid][pBikeLic]);fwrite(hFile, var);
format(var, 32, "LKWLic=%d\n",PlayerInfo[playerid][pLKWLic]);fwrite(hFile, var);
format(var, 32, "DonatorTime=%d\n",PlayerInfo[playerid][pDonatorZeit]);fwrite(hFile, var);
format(var, 32, "WerberName=%s\n",PlayerInfo[playerid][pWerberName]);fwrite(hFile, var);
format(var, 32, "FightingStyle=%d\n",PlayerInfo[playerid][pFightingStyle]);fwrite(hFile, var);
format(var, 32, "Handy=%d\n",PlayerInfo[playerid][pHandy]);fwrite(hFile, var);
format(var, 32, "OnDutySkin=%d\n",PlayerInfo[playerid][pOnDutySkin]);fwrite(hFile, var);
format(var, 32, "CarLicPoints=%d\n",PlayerInfo[playerid][pCarLicPoints]);fwrite(hFile, var);
format(var, 32, "BikeLicPoints=%d\n",PlayerInfo[playerid][pBikeLicPoints]);fwrite(hFile, var);
format(var, 32, "InviteSperre=%d\n",PlayerInfo[playerid][pInviteSperre]);fwrite(hFile, var);
format(var, 32, "wartime1=%d\n",PlayerInfo[playerid][pWarnTime1]);fwrite(hFile, var);
format(var, 32, "warntime2=%d\n",PlayerInfo[playerid][pWarnTime2]);fwrite(hFile, var);
format(var, 32, "Ticketsopen=%d\n",PlayerInfo[playerid][pTicketsopen]);fwrite(hFile, var);
fclose(hFile);
}
format(string,sizeof(string),"%s(%d) hat sich soebend mit der IP [%s] Registriert.", playername, playerid, PlayerInfo[playerid][pUserIP]);
EnterToLog("ip",string);
}
return 1;
}
//Nur ein Auschnitt
public PlayerUpdate(playerid)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerNPC(playerid))
{
return 1;
}
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
new endstring[1600];
new var[129];
format(endstring, sizeof(endstring), "UPDATE `users` SET ");
format(var, sizeof(var), "`Key`='%s', ", PlayerInfo[playerid][pKey]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Level`='%d', ", PlayerInfo[playerid][pLevel]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`AdminLevel`='%d', ", PlayerInfo[playerid][pAdmin]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`DonateRank`='%d', ", PlayerInfo[playerid][pDonatorRank]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`UpgradePoints`='%d', ", PlayerInfo[playerid][gPupgrade]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`ConnectedTime`='%d', ", PlayerInfo[playerid][pConnectTime]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Registered`='%d', ", PlayerInfo[playerid][pReg]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Sex`='%d', ", PlayerInfo[playerid][pSex]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Age`='%d', ", PlayerInfo[playerid][pAlter]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Origin`='%d', ", PlayerInfo[playerid][pOrigin]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Muted`='%d', ", PlayerInfo[playerid][pMuted]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Respect`='%d', ", PlayerInfo[playerid][pRespekt]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Money`='%d', ", PlayerInfo[playerid][pCash]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Bank`='%d', ", PlayerInfo[playerid][pBank]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Allowed`='%d', ", PlayerInfo[playerid][pAllowed]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`bankfach1`='%d', ", PlayerInfo[playerid][pBankFach1]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`bankfach2`='%d', ", PlayerInfo[playerid][pBankFach2]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`bankfach3`='%d', ", PlayerInfo[playerid][pBankFach3]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`bankfach4`='%d', ", PlayerInfo[playerid][pBankFach4]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`wgs`='%d', ", PlayerInfo[playerid][pwgs]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`facherlaubis`='%d', ", PlayerInfo[playerid][pfacherlaubis]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Crimes`='%d', ", PlayerInfo[playerid][pCrimes]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Kills`='%d', ", PlayerInfo[playerid][pKills]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`sKills`='%d', ", PlayerInfo[playerid][psKills]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Deaths`='%d', ", PlayerInfo[playerid][pDeaths]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Arrested`='%d', ", PlayerInfo[playerid][pArrested]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`ArrestTime`='%d', ", PlayerInfo[playerid][pArrestTime]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`PhoneBook`='%d', ", PlayerInfo[playerid][pPhoneBook]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`LottoNr`='%d', ", PlayerInfo[playerid][pLottoNr]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Fishes`='%d', ", PlayerInfo[playerid][pFishes]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`BiggestFish`='%d', ", PlayerInfo[playerid][pBiggestFish]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Job`='%d', ", PlayerInfo[playerid][pJob]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Paycheck`='%d'", PlayerInfo[playerid][pPayCheck]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), " WHERE `Name`='%s'", playername);
strcat(endstring, var, sizeof(endstring));
self_mysql_query(endstring);format(endstring, sizeof(endstring), "UPDATE `users` SET ");
format(var, sizeof(var), "`HeadValue`='%d', ", PlayerInfo[playerid][pHeadValue]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Jailed`='%d', ", PlayerInfo[playerid][pJailed]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`JailTime`='%d', ", PlayerInfo[playerid][pJailTime]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Leader`='%d', ", PlayerInfo[playerid][pLeader]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Member`='%d', ", PlayerInfo[playerid][pMember]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Rank`='%d', ", PlayerInfo[playerid][pRank]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Skin`='%d', ", PlayerInfo[playerid][pChar]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Vertragszeit`='%d', ", PlayerInfo[playerid][pVertragszeit]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`DetSkill`='%d', ", PlayerInfo[playerid][pDetSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`SexSkill`='%d', ", PlayerInfo[playerid][pSexSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`LawSkill`='%d', ", PlayerInfo[playerid][pAnwaltSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`MechSkill`='%d', ", PlayerInfo[playerid][pMechSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`JackSkill`='%d'", PlayerInfo[playerid][pJackSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), " WHERE `Name`='%s'", playername);
strcat(endstring, var, sizeof(endstring));
self_mysql_query(endstring);format(endstring, sizeof(endstring), "UPDATE `users` SET ");
format(var, sizeof(var), "`CarSkill`='%d', ", PlayerInfo[playerid][pCarSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`NewsSkill`='%d', ", PlayerInfo[playerid][pNewsSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`DrugsSkill`='%d', ", PlayerInfo[playerid][pDrugsSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`CookSkill`='%d', ", PlayerInfo[playerid][pCookSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`FishSkill`='%d', ", PlayerInfo[playerid][pFishSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`pSHealth`='%.1f', ", PlayerInfo[playerid][pSHealth]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`PhoneNr`='%d', ", PlayerInfo[playerid][pNummer]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`House`='%d', ", PlayerInfo[playerid][pPhousekey]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Biz`='%d', ", PlayerInfo[playerid][pBizKey]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`CarLic`='%d', ", PlayerInfo[playerid][pCarLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`FlyLic`='%d', ", PlayerInfo[playerid][pFlyLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`BoatLic`='%d', ", PlayerInfo[playerid][pBoatLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`FishLic`='%d', ", PlayerInfo[playerid][pFishLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`GunLic`='%d', ", PlayerInfo[playerid][pGunLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), " WHERE `Name`='%s'", playername);
strcat(endstring, var, sizeof(endstring));
self_mysql_query(endstring); -
Hey,
Ich habe 2x Probleme mit dem IR Script, das 1 Problem ist das wenn ich mich einlogge i.wie die ganze Zeit sterbe obwohl ich alles versucht habe, es zu ändern mit SetPlayerHea.. 100. Das 2te Problem ist, wenn ich mir alle Scheine und mich dann auslogge und wieder einlogge habe ich nur Bike Schein und LKW die anderen sind weg :oWelcher kennt jemand das Problem, wenn nicht poste ich den Code.
mfg
-