18.12.2012, 09:30
pawn Код:
stock IsPlayerOwnedHouse(playerid)
{
for(new i = 0; i < MAX_HOUSES;i++)//Loop threw all houses.
{
new pName[24];
GetPlayerName(playerid,pName,sizeof(pName));
HInfo[i][Owned] == 1 && strcmp(HInfo[i][Owner],pName) == 0
return 1;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_MHOUSE)
{
switch(listitem)
{
case 0:
{
if(IsPlayerOwnedHouse(playerid))
{
ShowPlayerDialog(playerid,DIALOG_MHOUSE2,DIALOG_STYLE_INPUT,"{00FF00}House System","Type Your New Name Of Your House","Finish","Close");
}
}
case 1:
{
SellHouse(playerid);
}
}
}
return 1;
}
pawn Код:
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\filterscripts\MyOwnhouses.pwn(236 -- 237) : warning 215: expression has no effect
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\filterscripts\MyOwnhouses.pwn(237) : error 001: expected token: ";", but found "return"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.