14.08.2012, 07:02
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/createhouse", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
new Float:x,Float:y,Float:z;
new HousePrice,id = HouseCount;
GetPlayerPos(playerid,x,y,z);
if(sscanf(params,"i",HousePrice)) return SendClientMessage(playerid,-1,"USAGE: /createhouse <price>");
HInfo[id][Price] = HousePrice;
HInfo[id][XPos] = x;
HInfo[id][YPos] = y;
HInfo[id][ZPos] = z;
HInfo[id][VirtualWorld] = GetPlayerVirtualWorld(playerid);
CreatePickup(1278,1,HInfo[id][XPos],HInfo[id][YPos],HInfo[id][ZPos],-1);
}
return 1;
}