Hey.. /me hat wiedermal ein Problem :s
Wenn ich den Command (/newhouse) benutze, dann kommt einfach nur ein
"Server unknown Command" mehr nicht.
Woran liegt das?
/EDIT: So, jetzt wird schonmal das Pickup und der 3dtext erstellt. Jedoch wird der Besitzer nicht angezeigt.
Hier der Command:
if(!strcmp(cmd, "/newhouse"))
{
tmp = strtok(cmdtext, idx);
new player;
player = strval(tmp);
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "[ACMD] Ein neues Haus errichten.");
SendClientMessage(playerid, COLOR_RED, "[ACMD] /newhouse [ID]");
SendClientMessage(playerid, COLOR_RED, "[ACMD] ID: gehört das Haus");
return 1;
}
else
{
new Float:eingangx, Float:eingangy, Float:eingangz;
GetPlayerPos(playerid, eingangx, eingangy, eingangz);
CreateHouse(player, eingangx, eingangy, eingangz);
}
}
Hier das Stock:
stock CreateHouse(pid, Float:eex, Float:eey, Float:eez)
{
new string[50];
new Float:eez2;
eez2 = eez + 0.4;
housing[schon_erstellt][ex] = (eex);
housing[schon_erstellt][ey] = (eey);
housing[schon_erstellt][ez] = (eez);
housing[schon_erstellt][ist_da] = (1);
housing[schon_erstellt][besitzer] = pid;
schon_erstellt++;
CreatePickup(1272, 1, eex, eey, eez, 0);
format(string, sizeof(string), "Besitzer:%s\nMiete:%d",housing[schon_erstellt][besitzer], housing[schon_erstellt][miete]);
Create3DTextLabel(string, COLOR_PICKUP3DTEXT, eex, eey, eez2, 10, 0, 0);
}
Enum: (zur Sicherheit :P)
enum haus{
Float:ex,
Float:ey,
Float:ez,
ist_da,
miete,
Float:ix,
Float:iy,
Float:iz,
besitzer
}
new housing[MAXIMAL_PICKUPS][haus];
new schon_erstellt;
Mfg Butchey