Üdv! Valaki segítene?
Ezt a pár parancsot kellene átirni zcmd ről strcmp-re:
Válaszokat előre is köszönöm!
CMD:ujhaz(playerid,params[])
{
new price,interior;
if(sscanf(params, \"dd\",interior, price)) return SendClientMessage(playerid, 0x008080FF, \"Használat: /ujhaz [interiorID 0-6] [Ár]\");
new Float:houX,Float:houY,Float:houZ;
if (!Admin(playerid, 5))
{
return 1;
}
if(1 > interior < 6) return SendClientMessage(playerid,0x008080FF, \"Használat: /ujhaz [interiorID 0-6] [Ár]\");
if(interior == 1)
{
HouseID++;
GetPlayerPos(playerid,houX,houY,houZ);
CreateHouse(HouseID,price,houX,houY,houZ,2468.5847,-1698.2347,1013.5078,2,1);
}
if(interior == 2)
{
HouseID++;
GetPlayerPos(playerid,houX,houY,houZ);
CreateHouse(HouseID,price,houX,houY,houZ,2259.3967,-1135.4960,1050.6403,12,2);
}
if(interior == 3)
{
HouseID++;
GetPlayerPos(playerid,houX,houY,houZ);
CreateHouse(HouseID,price,houX,houY,houZ,2269.6750,-1210.3187,1047.5625,10,3);
}
if(interior == 4)
{
HouseID++;
GetPlayerPos(playerid,houX,houY,houZ);
CreateHouse(HouseID,price,houX,houY,houZ,2259.3967,-1135.4960,1050.6403,10,4);
}
if(interior == 5)
{
HouseID++;
GetPlayerPos(playerid,houX,houY,houZ);
CreateHouse(HouseID,price,houX,houY,houZ,2496.2285,-1692.4236,1014.7422,3,5);
}
if(interior == 6)
{
HouseID++;
GetPlayerPos(playerid,houX,houY,houZ);
CreateHouse(HouseID,price,houX,houY,houZ,225.630997,1022.479980,1084.069946,7,6);
}
return 1;
}
CMD:enter(playerid,params[])
{
new houseid = GetHouseID(playerid);
if(houseid == -1)return SendClientMessage(playerid, -1, \"Nem vagy a ház közelében!\");
else
{
if(h_Data[houseid][hSell] == 0)
{
ShowPlayerDialog(playerid,DIALOG_SELL,DIALOG_STYLE_LIST,\"Ház megvétele\",\"Megvesz\",\"Választ\",\"Mégse\");
}
if(h_Data[houseid][hSell] == 1)
{
ShowPlayerDialog(playerid,DIALOG_SOLD,DIALOG_STYLE_INPUT,\"Ház jelszava\",\"Írd be a házhoz tartozó jelszót!\",\"Választ\",\"Mégse\");
}
}
return 1;
}
CMD:exit(playerid,params[])
{
new Houser = GetPVarInt(playerid, \"houseid\");
if(Houser == -1) return SendClientMessage(playerid, 0xFF0000AA, \"Nem vagy házban.\");
if(IsPlayerInRangeOfPoint(playerid, 3.0, h_Data[Houser][hIntX],h_Data[Houser][hIntY],h_Data[Houser][hIntZ]))
{
GetPlayerInterior(playerid);
SetPlayerPos(playerid,h_Data[Houser][hX],h_Data[Houser][hY],h_Data[Houser][hZ]);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
SetPVarInt(playerid, \"houseid\", -1);
}
else return SendClientMessage(playerid, 0xFF0000AA, \"Nem vagy az ajtónál!\");
return 1;
}
CMD:torolhaz(playerid,params[])
{
if (!Admin(playerid, 5))
{
return 1;
}
new houseid = GetHouseID(playerid);
if(houseid == -1)return SendClientMessage(playerid, -1, \"Nem vagy a ház közelében!\");
else
{
RemoveHouse(playerid);
}
return 1;
}