[Pomoc] STRCMP u ZCMD

22. Sep. 2013. Zaključano
287
pregleda
2
postova
Polat Alemdar
4
Enforcer
22. Sep. 2013.
Skriptu koju koristim : Moju 😛

Imali kakva definicija da moze ZCMD i STRCMP da se koriste ako nemoze mozeli ove komande u ZCMD
http://pastebin.com/DnyEhM0V
Vuzimir
5
Kingpin
22. Sep. 2013.
evo ti u zcmd komanda:
CMD:buyhouse(playerid, params[])
{
    new pName; //For the player's name - For the house
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME); //Get the name of the player and store it in pName
    for(new i = 0; i < MAX_HOUSES; i++) //Last time I'm gonna say it: Loop through all the houses
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo, HouseInfo, HouseInfo) && GetPlayerInterior(playerid) == HouseInfo && GetPlayerVirtualWorld(playerid) == HouseInfo) //Is player near house entrance, and if player is in interior of that house + virtual world (Last time I said this too!)
        {
            if(HouseInfo) return SendClientMessage(playerid, COLOR_RED, "This house is already owned!"); //Is the house owned? Then send message that it's owned and stop.
            if(GetPlayerMoney(playerid) < HouseInfo) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money for this!"); //Has player too less money? Send him a message!

            HouseInfo = true; //The house is owned, where the player used /buyhouse
            strmid(HouseInfo, pName, 0, false, strlen(pName)); //Put the players name into the "hOwner" of the house
            GivePlayerMoney(playerid, -HouseInfo); //Remove some money of the player.. The value of the house
            SendClientMessage(playerid, COLOR_GREEN, "House bought!"); //Send the player an message.
            SaveHouse(i);
            LoadHouseVisual(i, true); //Load House Visual. Now, I've added ', true': It will RELOAD now!
            return 1;
        }
    }
    return 1;
}


a ti ako hoces mozes koristiti u zcmd i strcmp

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha