Sehr geehrte Damen und Herren,
ich habe ein Problem bei meinem Suchti Script.
Mein /hcreate Funktioniert nicht ... ich sitze da schon ne längere zeit dran, aber es will und will nicht funzen
hier mal der befehl:
Code
else if (strcmp("/hcreate", cmdtext, true, 8) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] > 1335)
{
if(PlayerInfo[playerid][pSCAdmin] < 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Gfiget nix für dich!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze /hcreate Aktion >");
SendClientMessage(playerid, COLOR_GRAD2, "Verfügbare Aktionen:");
SendClientMessage(playerid, COLOR_GRAD2, "- newh, - spawna, - showint, - useint, - carspawn, - preis, - spielstunden - save");
return 1;
}
if(strcmp(tmp, "newh", true) == 0)
{
PlayerInfo[playerid][pCreateH] = Houses_Index;
format(string, sizeof(string), "Du bearbeitest nun Haus %d", Houses_Index);
SendClientMessage(playerid, COLOR_GRAD2, string);
HouseInfo[Houses_Index][hHel] = 0;
HouseInfo[Houses_Index][hArm] = 0;
HouseInfo[Houses_Index][hHealthx] = 0;
HouseInfo[Houses_Index][hHealthy] = 0;
HouseInfo[Houses_Index][hHealthz] = 0;
HouseInfo[Houses_Index][hArmourx] = 0;
HouseInfo[Houses_Index][hArmoury] = 0;
HouseInfo[Houses_Index][hArmourz] = 0;
HouseInfo[Houses_Index][hLock] = 1;
HouseInfo[Houses_Index][hOwned] = 0;
HouseInfo[Houses_Index][hVec] = 589;
HouseInfo[Houses_Index][hVcol1] = -1;
HouseInfo[Houses_Index][hVcol2] = -1;
HouseInfo[Houses_Index][hRentabil] = 0;
Houses_Index++;
return 1;
}
if(strcmp(tmp, "spawna", true) == 0)
{
new Float:x88,Float:y88,Float:z88;
GetPlayerPos(playerid, x88,y88,z88);
HouseInfo[PlayerInfo[playerid][pCreateH]][hEntrancex] = x88;
HouseInfo[PlayerInfo[playerid][pCreateH]][hEntrancey] = y88;
HouseInfo[PlayerInfo[playerid][pCreateH]][hEntrancez] = z88;
format(string, sizeof(string), "H%d:Spawn-Außen %f/%f/%f",PlayerInfo[playerid][pCreateH], x88,y88,z88);
SendClientMessage(playerid, COLOR_GRAD2, string);
CreatePickup(1273, 1, x88, y88, z88);
}
if(strcmp(tmp, "showint", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Use /hcreate showint [ID] >");
return 1;
}
new in = strval(tmp);
if(in < 0 || (in < 10 && in > 6) || in > 20)
{
SendClientMessage(playerid, COLOR_GRAD2, "Kleine Wohnung: 0-6, Große Häuser 10-20");
return 1;
}
SetPlayerInterior(playerid, HouseInt_Interior[in]);
SetPlayerPos(playerid, HouseInt_Spawn_X[in],HouseInt_Spawn_Y[in],HouseInt_Spawn_Z[in]);
format(string, sizeof(string), "Innenraum %d", in);
SendClientMessage(playerid, COLOR_GRAD2, string);
}
if(strcmp(tmp, "useint", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Use /hcreate useint [ID] >");
return 1;
}
new in = strval(tmp);
if(in < 0 || (in < 10 && in > 6) || in > 20)
{
SendClientMessage(playerid, COLOR_GRAD2, "Kleine Wohnung: 0-6, Große Häuser 10-20");
return 1;
}
format(string, sizeof(string), "H%d:Innenraum %d wird verwendet.",PlayerInfo[playerid][pCreateH], in);
SendClientMessage(playerid, COLOR_GRAD2, string);
HouseInfo[PlayerInfo[playerid][pCreateH]][hInteriorID] = in;
}
if(strcmp(tmp, "preis", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Use /hcreate preis [ammount] >");
return 1;
}
new in = strval(tmp);
format(string, sizeof(string), "H%d kostet jetzt: %d",PlayerInfo[playerid][pCreateH], in);
SendClientMessage(playerid, COLOR_GRAD2, string);
HouseInfo[PlayerInfo[playerid][pCreateH]][hValue] = in;
}
if(strcmp(tmp, "spielstunden", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Use /hcreate spielstunden [ammount] >");
return 1;
}
new in = strval(tmp);
format(string, sizeof(string), "H%d benötigt jetzt: %d Spielstunden",PlayerInfo[playerid][pCreateH], in);
SendClientMessage(playerid, COLOR_GRAD2, string);
HouseInfo[PlayerInfo[playerid][pCreateH]][hLevel] = in;
}
if(strcmp(tmp, "carspawn", true) == 0)
{
new Float:x88,Float:y88,Float:z88,Float:Rot88;
GetPlayerPos(playerid, x88,y88,z88);
GetVehicleZAngle(GetPlayerVehicleID(playerid), Rot88);
HouseInfo[PlayerInfo[playerid][pCreateH]][hCarSpawnX] = x88;
HouseInfo[PlayerInfo[playerid][pCreateH]][hCarSpawnY] = y88;
HouseInfo[PlayerInfo[playerid][pCreateH]][hCarSpawnZ] = z88;
HouseInfo[PlayerInfo[playerid][pCreateH]][hCarSpawnRot] = Rot88;
format(string, sizeof(string), "H%d:Car-Spawn-Außen %f/%f/%f/%f",PlayerInfo[playerid][pCreateH], x88,y88,z88,Rot88);
SendClientMessage(playerid, COLOR_GRAD2, string);
}
if(strcmp(tmp, "save", true) == 0)
{
SaveStuff();
OnPropUpdate();
SendClientMessage(playerid, COLOR_GRAD2, "Alle Häuser wurden gespeichert");
}
}
}
return 1;
}
Alles anzeigen
Ich habe den new HouseInfo wieder auf 100 gesetz (new HouseInfo[100] )
Ich habe in dem ordner Scrptfiles die Properety Datei geleert
Ich habe es schon mit Spezial Admin versucht, also auch den Spezial Admin in den User Datein festgelegt ...
Nichts hat funktioniert !
Ich würde mich freuen, könnte mir jemand helfen!
p.s. UPPS, das Youtube Video, sollte da nicht hin xD