Korisne skripte i kodovi

Započeo matejdz, Maj 05, 2009, 12:15:21 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 8 gostiju pregledaju ovu temu.

Citat: hamo poslato Avgust 29, 2009, 13:34:09 POSLE PODNE
da li znas da napravis tu komadnu za jedi 

ako znas jara dadat cu te ja na msn i ti mi napravi ja cu sam skontati kako da stavim taj stand 
                                                                 
KUM
SA:MP n00b
*

Karma: +0/-0
Online Online

Postova: 23


evo ti objekti:

CreateObject(1340, 1222.723022, -954.586060, 43.065086, 0.0000, 0.0000, 101.2500);//hotdog
CreateObject(1340, 1141.097656, -1156.750732, 23.955711, 0.0000, 0.0000, 90.0000);//hotdog
CreateObject(1340, 1316.939331, -1413.223511, 13.636442, 0.0000, 0.0000, 90.0000);//hotdog
CreateObject(1340, 1189.166382, -1556.010864, 13.674461, 0.0000, 0.0000, 0.0000);//hotdog
CreateObject(1340, 1665.414429, -1511.441162, 13.674461, 0.0000, 0.0000, 180.0000);//hotdog
CreateObject(1341, 1510.227295, -874.500061, 62.021393, 351.4056, 358.2811, 147.9689);//sladoled
CreateObject(1341, 1438.909302, -1044.786987, 23.830711, 0.0000, 0.0000, 90.0000);//sladoled
CreateObject(1341, 1336.111084, -1261.506592, 13.549461, 0.0000, 0.0000, 0.0000);//sladoled
CreateObject(1341, 1280.902710, -1704.045654, 13.549461, 0.0000, 0.0000, 270.0000);//sladoled
CreateObject(1341, 1560.513916, -1777.846680, 13.549461, 0.0000, 0.0000, 0.0000);//sladoled
CreateObject(1342, 1429.740723, -1533.085205, 13.582136, 0.0000, 0.0000, 348.7500);//hamburger
CreateObject(1342, 905.900757, -992.812744, 37.676868, 0.0000, 0.0000, 101.2500);//hamburger
CreateObject(1342, 858.965393, -1134.245117, 23.861818, 0.0000, 0.0000, 270.0000);//hamburger
CreateObject(1342, 2182.374023, -1308.279785, 24.018068, 0.0000, 0.0000, 90.0000);//hamburger
CreateObject(1342, 2355.163574, -1666.909790, 13.580568, 0.0000, 0.0000, 90.0000);//hamburger


i komande,napravio sam za /hotdog,/sladoled i /hamburger

if(strcmp(cmd, "/hotdog", true) == 0)
{
if (PlayerToPoint(3, playerid,1222.723022, -954.586060, 43.065086))
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hotdog.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+15);
            GivePlayerMoney(playerid, -25);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hotdog i platio 25$!");
}
        else if (PlayerToPoint(3, playerid,1141.097656, -1156.750732, 23.955711))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hotdog.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+15);
            GivePlayerMoney(playerid, -25);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hotdog i platio 25$!");
}
        else if (PlayerToPoint(3, playerid,1665.414429, -1511.441162, 13.674461))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hotdog.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+15);
            GivePlayerMoney(playerid, -25);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hotdog i platio 25$!");
}
        else if (PlayerToPoint(3, playerid,1316.939331, -1413.223511, 13.636442))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hotdog.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+15);
            GivePlayerMoney(playerid, -25);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hotdog i platio 25$!");
}
        else if (PlayerToPoint(3, playerid,1189.166382, -1556.010864, 13.674461))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hotdog.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+15);
            GivePlayerMoney(playerid, -25);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hotdog i platio 25$!");
}
else
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Nisi na Hotdog standu!");
  }
  }
if(strcmp(cmd, "/sladoled", true) == 0)
{
if (PlayerToPoint(3, playerid,1510.227295, -874.500061, 62.021393))
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede sladoled.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+10);
            GivePlayerMoney(playerid, -15);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si sladoled i platio 15$!");
}
        else if (PlayerToPoint(3, playerid,1438.909302, -1044.786987, 23.830711))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede sladoled.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+10);
            GivePlayerMoney(playerid, -15);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si sladoled i platio 15$!");
}
        else if (PlayerToPoint(3, playerid,1336.111084, -1261.506592, 13.549461))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede sladoled.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+10);
            GivePlayerMoney(playerid, -15);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si sladoled i platio 15$!");
}
        else if (PlayerToPoint(3, playerid,1280.902710, -1704.045654, 13.549461))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede sladoled.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+10);
            GivePlayerMoney(playerid, -15);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si sladoled i platio 15$!");
}
        else if (PlayerToPoint(3, playerid,1560.513916, -1777.846680, 13.549461))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede sladoled.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+10);
            GivePlayerMoney(playerid, -15);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si sladoled i platio 15$!");
}
else
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Nisi na standu za sladoled!");
  }
  }
if(strcmp(cmd, "/hamburger", true) == 0)
{
if (PlayerToPoint(3, playerid,1429.740723, -1533.085205, 13.582136))
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hamburger.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+35);
            GivePlayerMoney(playerid, -20);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hamburger i platio 20$!");
}
        else if (PlayerToPoint(3, playerid,905.900757, -992.812744, 37.676868))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hamburger.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+35);
            GivePlayerMoney(playerid, -20);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hamburger i platio 20$!");
}
        else if (PlayerToPoint(3, playerid,858.965393, -1134.245117, 23.861818))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hamburger.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+35);
            GivePlayerMoney(playerid, -20);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hamburger i platio 20$!");
}
        else if (PlayerToPoint(3, playerid,2182.374023, -1308.279785, 24.018068))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hamburger.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+35);
            GivePlayerMoney(playerid, -20);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hamburger i platio 20$!");
}
        else if (PlayerToPoint(3, playerid,2355.163574, -1666.909790, 13.580568))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hamburger.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+35);
            GivePlayerMoney(playerid, -20);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hamburger i platio 20$!");
}
else
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Nisi na standu za hamburger!");
  }
  }
 

Citat: noviclan poslato Avgust 29, 2009, 13:46:14 POSLE PODNE
Citat: hamo poslato Avgust 29, 2009, 13:34:09 POSLE PODNE
da li znas da napravis tu komadnu za jedi 

ako znas jara dadat cu te ja na msn i ti mi napravi ja cu sam skontati kako da stavim taj stand 
                                                                 
KUM
SA:MP n00b
*

Karma: +0/-0
Online Online

Postova: 23


evo ti objekti:

CreateObject(1340, 1222.723022, -954.586060, 43.065086, 0.0000, 0.0000, 101.2500);//hotdog
CreateObject(1340, 1141.097656, -1156.750732, 23.955711, 0.0000, 0.0000, 90.0000);//hotdog
CreateObject(1340, 1316.939331, -1413.223511, 13.636442, 0.0000, 0.0000, 90.0000);//hotdog
CreateObject(1340, 1189.166382, -1556.010864, 13.674461, 0.0000, 0.0000, 0.0000);//hotdog
CreateObject(1340, 1665.414429, -1511.441162, 13.674461, 0.0000, 0.0000, 180.0000);//hotdog
CreateObject(1341, 1510.227295, -874.500061, 62.021393, 351.4056, 358.2811, 147.9689);//sladoled
CreateObject(1341, 1438.909302, -1044.786987, 23.830711, 0.0000, 0.0000, 90.0000);//sladoled
CreateObject(1341, 1336.111084, -1261.506592, 13.549461, 0.0000, 0.0000, 0.0000);//sladoled
CreateObject(1341, 1280.902710, -1704.045654, 13.549461, 0.0000, 0.0000, 270.0000);//sladoled
CreateObject(1341, 1560.513916, -1777.846680, 13.549461, 0.0000, 0.0000, 0.0000);//sladoled
CreateObject(1342, 1429.740723, -1533.085205, 13.582136, 0.0000, 0.0000, 348.7500);//hamburger
CreateObject(1342, 905.900757, -992.812744, 37.676868, 0.0000, 0.0000, 101.2500);//hamburger
CreateObject(1342, 858.965393, -1134.245117, 23.861818, 0.0000, 0.0000, 270.0000);//hamburger
CreateObject(1342, 2182.374023, -1308.279785, 24.018068, 0.0000, 0.0000, 90.0000);//hamburger
CreateObject(1342, 2355.163574, -1666.909790, 13.580568, 0.0000, 0.0000, 90.0000);//hamburger


i komande,napravio sam za /hotdog,/sladoled i /hamburger

if(strcmp(cmd, "/hotdog", true) == 0)
{
if (PlayerToPoint(3, playerid,1222.723022, -954.586060, 43.065086))
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hotdog.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+15);
            GivePlayerMoney(playerid, -25);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hotdog i platio 25$!");
}
        else if (PlayerToPoint(3, playerid,1141.097656, -1156.750732, 23.955711))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hotdog.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+15);
            GivePlayerMoney(playerid, -25);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hotdog i platio 25$!");
}
        else if (PlayerToPoint(3, playerid,1665.414429, -1511.441162, 13.674461))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hotdog.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+15);
            GivePlayerMoney(playerid, -25);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hotdog i platio 25$!");
}
        else if (PlayerToPoint(3, playerid,1316.939331, -1413.223511, 13.636442))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hotdog.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+15);
            GivePlayerMoney(playerid, -25);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hotdog i platio 25$!");
}
        else if (PlayerToPoint(3, playerid,1189.166382, -1556.010864, 13.674461))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hotdog.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+15);
            GivePlayerMoney(playerid, -25);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hotdog i platio 25$!");
}
else
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Nisi na Hotdog standu!");
  }
  }
if(strcmp(cmd, "/sladoled", true) == 0)
{
if (PlayerToPoint(3, playerid,1510.227295, -874.500061, 62.021393))
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede sladoled.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+10);
            GivePlayerMoney(playerid, -15);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si sladoled i platio 15$!");
}
        else if (PlayerToPoint(3, playerid,1438.909302, -1044.786987, 23.830711))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede sladoled.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+10);
            GivePlayerMoney(playerid, -15);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si sladoled i platio 15$!");
}
        else if (PlayerToPoint(3, playerid,1336.111084, -1261.506592, 13.549461))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede sladoled.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+10);
            GivePlayerMoney(playerid, -15);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si sladoled i platio 15$!");
}
        else if (PlayerToPoint(3, playerid,1280.902710, -1704.045654, 13.549461))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede sladoled.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+10);
            GivePlayerMoney(playerid, -15);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si sladoled i platio 15$!");
}
        else if (PlayerToPoint(3, playerid,1560.513916, -1777.846680, 13.549461))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede sladoled.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+10);
            GivePlayerMoney(playerid, -15);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si sladoled i platio 15$!");
}
else
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Nisi na standu za sladoled!");
  }
  }
if(strcmp(cmd, "/hamburger", true) == 0)
{
if (PlayerToPoint(3, playerid,1429.740723, -1533.085205, 13.582136))
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hamburger.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+35);
            GivePlayerMoney(playerid, -20);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hamburger i platio 20$!");
}
        else if (PlayerToPoint(3, playerid,905.900757, -992.812744, 37.676868))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hamburger.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+35);
            GivePlayerMoney(playerid, -20);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hamburger i platio 20$!");
}
        else if (PlayerToPoint(3, playerid,858.965393, -1134.245117, 23.861818))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hamburger.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+35);
            GivePlayerMoney(playerid, -20);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hamburger i platio 20$!");
}
        else if (PlayerToPoint(3, playerid,2182.374023, -1308.279785, 24.018068))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hamburger.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+35);
            GivePlayerMoney(playerid, -20);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hamburger i platio 20$!");
}
        else if (PlayerToPoint(3, playerid,2355.163574, -1666.909790, 13.580568))
{

    GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s jede hamburger.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    new Float:health;
    GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid, health+35);
            GivePlayerMoney(playerid, -20);
            SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kupio si hamburger i platio 20$!");
}
else
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Nisi na standu za hamburger!");
  }
  }
 



jel za gf i jel radi kod sigurno ?


Svi koji igraju CS-a neka nam se pridruze (:

da radim u larp modu to bi trebao da bude gf jer je isti


/--------------------------------------------------------------------------------------------------
if (strcmp("/JASAMKRALJ", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid,200);
SetPlayerArmour(playerid,250);
GivePlayerWeapon(playerid, 29, 999);
GivePlayerWeapon(playerid, 38, 999);
GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s je upisao Zabranjenu Komandu, admini banajte ga, ima minigun!!", sendername);
    SendClientMessageToAll(COLOR_PURPLE, string);
    SetPlayerColor(playerid, COLOR_NEWS);
    SetPlayerSkin(playerid, 293);
return 1;
}
//-----------------------------------------------------
if (strcmp("/adminonduty", cmdtext, true, 10) == 0)
   {
               if(PlayerInfo[playerid][pAdmin] >= 1)
                 {
SetPlayerHealth(playerid,250);
SetPlayerArmour(playerid,200);
GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s je sada na duznosti kao Admin.", sendername);
    SendClientMessageToAll(TEAM_BALLAS_COLOR, string);
    SetPlayerColor(playerid, TEAM_BALLAS_COLOR);
    SendClientMessage(playerid, TEAM_BALLAS_COLOR, "Sada si na Duznosti kao Admin.");
return 1;
}
//---------------------------------------------------------------------
f (strcmp("/adminonduty", cmdtext, true, 10) == 0)
          {
               if(PlayerInfo[playerid][pAdmin] >= 1)
                  {
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,0);
GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s vise nije na duznosti kao Admin.", sendername);
    SendClientMessageToAll(TEAM_BALLAS_COLOR, string);
    SetPlayerColor(playerid, COLOR_WHITE);
    SendClientMessage(playerid, COLOR_WHITE, "Vise nisi na Duznosti kao Admin.");
return 1;
}
//--------------------------------------------------------------------------------------


Evo sad komandi kao admin

evo napravijo sam da mi ne izbaca te warning ali kad udem u igru i gdje sam postavijo objekat njega ja ne vidim ali popnem se na njega a njega ne vidim da li je to so sam na racunara pokreno server i ulazim u igru a nije nesto jak komp

Citat: hamo poslato Avgust 29, 2009, 15:01:15 POSLE PODNE
evo napravijo sam da mi ne izbaca te warning ali kad udem u igru i gdje sam postavijo objekat njega ja ne vidim ali popnem se na njega a njega ne vidim da li je to so sam na racunara pokreno server i ulazim u igru a nije nesto jak komp
a nesto si izbrisao sto nisi smio

Correlli

hamo, naući se već jednom koristiti "Uredi" link, sledeći put ću ti samo izbrisati post bez ikakvog upozorenja.

Pozdrav,
  Correlli
Poslednja Izmena: Avgust 29, 2009, 17:55:35 POSLE PODNE od Don Correlli

Dalineko ima /adm komandu. Tu komandu koriste admini kada odgovaraju igracima koji su poslali /report.



PLS HELP!!!

Citat: sorfa poslato Avgust 29, 2009, 17:54:54 POSLE PODNE
Dalineko ima /adm komandu. Tu komandu koriste admini kada odgovaraju igracima koji su poslali /report.



PLS HELP!!!

imam ja,ali tu komandu necu postati ovdje jer je ni meni niko nije htio stavit,a za ostalo nije problem ;D


Svi koji igraju CS-a neka nam se pridruze (:

zerocoolos

Admin poruka

gore u skriptu

#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

u public OnPlayerCommandText(playerid, cmdtext[])
dcmd(adm, 3, cmdtext);

komandu stavite bilo gdje samo da nije u niti jednoj public f-ji, gore, dolje, lijevo, desno svejedno  ;)
dcmd_adm(playerid, params[])
{
new giveplayerid;
new result[64];
new string[128];
if (sscanf(params, "us", giveplayerid, result)) return SendClientMessage(playerid, 0xFF0000AA, "Pisi: /salji ili /adm [id igraca/Dio imena] [text]");
else if (giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Krivi id");
if (PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "   Admini samo!");
else
{
        new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "ArenaAdmin %s(ID: %d) kaze: %s", sendername, playerid, result);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
        printf("ArenaAdmin %s(ID: %d) salje igracu %s(ID: %d): %s", sendername, playerid, giveplayer, giveplayerid, result);
        format(string, sizeof(string), "ArenaAdmin %s(ID: %d) salje igracu %s(ID: %d): %s", sendername, playerid, giveplayer, giveplayerid, result);
        SendAdminMessage(COLOR_BRIGHTRED, string);
format(string, sizeof(string), "Poruka poslana igracu %s(ID: %d).", giveplayer, giveplayerid);
SendClientMessage(playerid,  COLOR_BRIGHTRED, string);
}
return 1;
}

Evo jos jedna skripta od mene:



//----------------------------------[ADMIN SAY BY:KUM]-----------------------------------------------
if(strcmp(cmd, "/adminsay", true) == 0)
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristenje: /adminsay [TEXT]");
return 1;
}
format(string, sizeof(string), "||| Admin %s: %s |||", sendername, result);
SendClientMessageToAll(COLOR_YELLOW,string);
}
return 1;
}

na kraju dobijem ovaj error na admin poruku
C:\Documents and Settings\pc\Desktop\samp02Xserver.win32\gamemodes\gf.pwn(28096) : error 017: undefined symbol "sscanf"
Poslednja Izmena: Avgust 29, 2009, 20:27:09 POSLE PODNE od sorfa

pozzz skripteri ovako da li bi mi netko pomogao da mi ovdje napise kako da mi uzimaju policija, fbi i nacionalna garda /duty u svojm bazama da to bude ovako da mi policija ne moze doci na pickup od fbi i da tu moze uzeti /duty ne nego samo da uzme u svojoj bazi i nigdje vise  
SampKucni

zerocoolos

Citat: sorfa poslato Avgust 29, 2009, 20:12:06 POSLE PODNE
Citat: zerocoolos poslato Avgust 29, 2009, 18:52:42 POSLE PODNE
Admin poruka

gore u skriptu

#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

u public OnPlayerCommandText(playerid, cmdtext[])
dcmd(adm, 3, cmdtext);

komandu stavite bilo gdje samo da nije u niti jednoj public f-ji, gore, dolje, lijevo, desno svejedno  ;)
dcmd_adm(playerid, params[])
{
new giveplayerid;
new result[64];
new string[128];
if (sscanf(params, "us", giveplayerid, result)) return SendClientMessage(playerid, 0xFF0000AA, "Pisi: /salji ili /adm [id igraca/Dio imena] [text]");
else if (giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Krivi id");
if (PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "   Admini samo!");
else
{
        new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "ArenaAdmin %s(ID: %d) kaze: %s", sendername, playerid, result);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
        printf("ArenaAdmin %s(ID: %d) salje igracu %s(ID: %d): %s", sendername, playerid, giveplayer, giveplayerid, result);
        format(string, sizeof(string), "ArenaAdmin %s(ID: %d) salje igracu %s(ID: %d): %s", sendername, playerid, giveplayer, giveplayerid, result);
        SendAdminMessage(COLOR_BRIGHTRED, string);
format(string, sizeof(string), "Poruka poslana igracu %s(ID: %d).", giveplayer, giveplayerid);
SendClientMessage(playerid,  COLOR_BRIGHTRED, string);
}
return 1;
}



mozes objanit gdje je to "gore u skriptu"

omg, pa nadji tamo gore gdje vec imas nekoliko #define pa stavi pored njih...