10.08.2010, 18:51
(Sry for bad English!)
Hi all, this cmd is my problem
That is to be a cmd which I sell my house,but it does not work...
my question is about the two lines:
this line is to check whether the player name matches a name with the house owner
&
Here I have a problem,
I want to do it that way, the owner of the name should be changed from the house in state...
How to do it the house the name from that of the owner's last will and not another house?
thx
Hi all, this cmd is my problem
Код:
if(strcmp(cmd,"/verkaufen",true)==0) { for(new h = 0; h < sizeof(HausInfo); h++ ) { if(SpielerInfo[playerid][pHaus] == 1) { new vSpielerName[MAX_PLAYER_NAME]; if(strcmp(vSpielerName, HausInfo[h][Besitzer], false) == 0) { GivePlayerMoney(playerid, HausInfo[h][Preis]/2); strmid(HausInfo[h][Besitzer], "Staat", 0, strlen("Staat"), 24); HausInfo[h][Vergeben] = 0; SendClientMessage(playerid, FARBE_WEIЯ,"Du hast dein Haus erfolgreich verkauft!"); SpielerInfo[playerid][pId] = 1000; SpielerInfo[playerid][pHaus] = 0; Verkauf(playerid); return 1; } else { SendClientMessage(playerid, FARBE_WEIЯ,"Dieses Haus gehцrt dir nicht!"); return 1; } } else { SendClientMessage(playerid, FARBE_WEIЯ,"Du hast kein Haus"); return 1; } } }
my question is about the two lines:
Код:
if(strcmp(vSpielerName, HausInfo[h][Besitzer], false) == 0)
&
Код:
strmid(HausInfo[h][Besitzer], "Staat", 0, strlen("Staat"), 24);
I want to do it that way, the owner of the name should be changed from the house in state...
How to do it the house the name from that of the owner's last will and not another house?
thx