14.09.2012, 14:35
Alright guys, Everything in the code below has been forward, new, and defined. So dont bother saying to do that. This command does work, but only for 6 ID, in the houses file i have, it has like 12 houses and i can only move 6 in game and nothing in the houses file. but i have set it to move house id 0-126. Please help me, i need this completed, before the opening of the server.
Код:
if(strcmp(cmd, "/hentrance", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "TIP: {FFFFFF}/hentrance [HouseID]"); return 1; } new houseid; houseid = strval(tmp); if(houseid < 0 || houseid > 126) { SendClientMessage(playerid, COLOR_GREY, "houseid Number can't be below 0 or above 126 !"); return 1; } for(new h = 0; h < sizeof(HouseInfo); h++) { if(houseid == HouseInfo[h][hNumber]) { new Float:vX,Float:vY,Float:vZ; GetPlayerPos(playerid,vX,vY,vZ); HouseInfo[h][hEntrancex] = vX; HouseInfo[h][hEntrancey] = vY; HouseInfo[h][hEntrancez] = vZ; AddStaticPickup(1273,23,vX,vY,vZ); SaveHouse(); SendClientMessage(playerid, COLOR_GREY, "You Have Seted a new entrance for the choosen house !"); return 1; } } } return 1; }