moin, was soll ich bei dem befehl jetzt für fullid machen?
ocmd:chaus(playerid,params[])
{
if(GetPVarInt(playerid,"Adminlevel")>10)
{
new preis,haus,vworld,hausid;
if(sscanf(params,"iii",preis,haus,vworld))return SendClientMessage(playerid,BLAU,"Benutze: /chaus [Preis] [Haus] [Virtual World]");
new Float:ax,Float:ay,Float:az;
GetPlayerPos(playerid,ax,ay,az);
HausInfo[fullid][hx] = ax;
HausInfo[fullid][hy] = ay;
HausInfo[fullid][hz] = az;
HausInfo[fullid][hPreis] = preis;
HausInfo[fullid][interior] = Typen[hhaus][interior];
HausInfo[fullid][ix] = Typen[haus][haus_x];
HausInfo[fullid][iy] = Typen[haus][haus_y];
HausInfo[fullid][iz] = Typen[haus][haus_z];
HausInfo[fullid][virtual_world] = vworld;
HausInfo[fullid][hClosed] = 1;
format(HausInfo[fullid][hOwner],32,"Keiner");
HausInfo[fullid][pickid] = CreatePickup(1273,1,ax,ay,az,0);
SaveHaus(fullid);
}
return 1;
}
//alter befehl:
if(!strcmp(cmdtext,"/chaus",true))
{
if(GetPVarInt(playerid,"Adminlevel")>10)
{
cmd1 = strtok(cmdtext,idx1);
if(!cmd1[0])return SendClientMessage(playerid,0xFF0000FF,"Nutze : /createhaus [kosten] [haus] [Virtual World]");
new hkosten = strval(cmd1);
cmd1 = strtok(cmdtext,idx1);
if(!cmd1[0])return SendClientMessage(playerid,0xFF0000FF,"Nutze : /createhaus [kosten] [haus] [Virtual World]");
new hhaus = strval(cmd1);
if(hhaus > sizeof(Typen) || hhaus < 0)return SendClientMessage(playerid,0xFF0000FF,"Ungültiges Haus!");
cmd1 = strtok(cmdtext,idx1);
if(!cmd1[0])return SendClientMessage(playerid,0xFF0000FF,"Nutze : /createhaus [kosten] [haus] [Virtual World]");
new hvw = strval(cmd1);
new Float:ax,Float:ay,Float:az;
new slotid = initSlot();
new fullid = (slotid==-1) ? (MAX_HAUS) : (slotid);
GetPlayerPos(playerid,ax,ay,az);
HausInfo[fullid][hx] = ax;
HausInfo[fullid][hy] = ay;
HausInfo[fullid][hz] = az;
HausInfo[fullid][hPreis] = hkosten;
HausInfo[fullid][interior] = Typen[hhaus][interior];
HausInfo[fullid][ix] = Typen[hhaus][haus_x];
HausInfo[fullid][iy] = Typen[hhaus][haus_y];
HausInfo[fullid][iz] = Typen[hhaus][haus_z];
HausInfo[fullid][virtual_world] = hvw;
HausInfo[fullid][hClosed] = 1;
format(HausInfo[fullid][hOwner],32,"Keiner");
HausInfo[fullid][pickid] = CreatePickup(1273,1,ax,ay,az,0);
SaveHaus(fullid);
}
return 1;
}