31.08.2009, 02:06
Код:
dcmd_house(playerid, params[]) { new command[128], owner[255]; if(Account[playerid][pAdminLevel] >= 20) { if (sscanf(params, "s", command)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /house <add>"); else { if(strcmp(command,"add", true ) == 0) { if (sscanf(command, "s", owner)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /house add <owner>"); else { new Float:x,Float:y,Float:z,Float:angle; GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid,angle); AddHouse(owner,x,y,z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid),angle,0/*exitx*/,0/*exity*/,0/*exitz*/,1337/*exitinterior*/,0/*exitangle*/,0/*owned*/,0/*rentable*/,0/*rentcost*/,0/*houseprice*/,0/*locked*/); } } else { return SendClientMessage(playerid, 0xFF0000AA, "Invalid house command."); } } } return 1; }
I can see where the problem is but i'm not sure how to solve it, i posted this ages ago and someone gave me a wonderful result which did the trick but i formatted and lost my script.