Hey ich habe ein Problem unzwar wenn ich meinen SBiznamen ändern will funktioniert es nicht
nur bei der Sbiz id 0 dort funktioniert alles aber bei allen anderen nicht
hier mein bizcode
if(strcmp(cmd, "/bizname", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, " Du besitzt keine Firma");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "Verwendung: /bizname [name]");
}
/*
new letter = 0;
while(letter < strlen(result))
{
if(result[letter] == '#' || result[letter] == '|') return SendClientMessage(playerid,COLOR_RED,"Nur Buchstaben und Zahlen verwenden!");
letter++;
}
*/
/*
if(strlen(result) < 1 || strlen(result) > 16)
{
SendClientMessage(playerid,COLOR_WHITE,"Benutzung: /bizname [Name] Achtung! Maximale Länge 16 Zeichen Nur Zahlen und Buchstaben");
return 1;
}
*/
if (bouse >= 100)
{
strmid(SBizzInfo[bouse-100][sbMessage], result, 0, 64, 255);
format(string, sizeof(string), "Name der Firma wurde auf '%s' geändert",SBizzInfo[bouse-100][sbMessage]);
}
else
{
strmid(BizzInfo[bouse][bMessage], result, 0, 64, 255);
format(string, sizeof(string), "Name der Firma wurde auf '%s' geändert",BizzInfo[bouse][bMessage]);
}
//OnPropUpdate();
SendClientMessage(playerid, COLOR_WHITE, string);
for(new h = 0; h < sizeof(SBizzInfo); h++)
{
if(SBizzInfo[h][sbOwned] == 1)
{
new string251[256];
new playerid25;
new LocationZone[MAX_ZONE_NAME];
Get2DZone(SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY],LocationZone,MAX_ZONE_NAME);
Delete3DTextLabel(sbizzsale[h]);
format(string251, sizeof(string251), ""CRVENA"[FIRMA]\n"BIJELA"Besitzer: "CRVENA"%s\n"BIJELA"CoBesitzer: "CRVENA"%s |"BIJELA"| Adresse: "CRVENA"%s\n "BIJELA"Preis: "CRVENA"%d$\n "BIJELA"Beschreibung der Firma:\n"CRVENA"%s",SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],LocationZone,SBizzInfo[h][sbEntranceCost],SBizzInfo[playerid25][sbMessage]);
sbizzsale[h] = Create3DTextLabel(string251,0x0080FFFF,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]+1,20,0,1);
Update3DTextLabelText(sbizzsale[h],0x0080FFFF,string251);
OnPropUpdate();
pickups++;
}
}
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bOwned] == 1)
{
new string251[256];
new playerid25;
new LocationZone[MAX_ZONE_NAME];
Get2DZone(BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY],LocationZone,MAX_ZONE_NAME);
Delete3DTextLabel(bizzsale[h]);
format(string251, sizeof(string251), ""CRVENA"[FIRMA]\n"BIJELA"Besitzer: "CRVENA"%s\n"BIJELA"CoBesitzer: "CRVENA"%s |"BIJELA"| Adresse: "CRVENA"%s\n "BIJELA"Eintrittsreis: "CRVENA"%d$\n "BIJELA"Beschreibung der Firma:\n"CRVENA"%s",BizzInfo[h][bOwner],BizzInfo[h][bExtortion],LocationZone,BizzInfo[h][bEntranceCost],BizzInfo[playerid25][bMessage]);
bizzsale[h] = Create3DTextLabel(string251,0x0080FFFF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]+1,20,0,1);
Update3DTextLabelText(bizzsale[h],0x0080FFFF,string251);
OnPropUpdate();
}
}
/*
new string1[256];
new LocationZone[MAX_ZONE_NAME];
Get2DZone(SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY],LocationZone,MAX_ZONE_NAME);
format(string1, sizeof(string1), ""CRVENA"[FIRMA]\n"BIJELA"Besitzer: "CRVENA"%s\n"BIJELA"CoBesitzer: "CRVENA"%s |"BIJELA"| Adresse: "CRVENA"%s\n "BIJELA"Preis: "CRVENA"%d$\n "BIJELA"Beschreibung der Firma:\n"CRVENA"%s",SBizzInfo[b][sbOwner],SBizzInfo[b][sbExtortion],LocationZone,SBizzInfo[b][sbEntranceCost],SBizzInfo[bouse-100][sbMessage]);
Update3DTextLabelText(sbizzsale[b],0x0080FFFF,string1);
*/
//}
}
return 1;
}