[pomoc]COS

Započeo Matrix_Green, Januar 01, 2012, 14:19:46 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta:NX
Problem:Ma nije problem nego neznam kako da prebacim cos u dialog msm da ukucas npr /kupivozilo i da izbacio dialog i da ti izaberes auto kupis i spawnas ga ispred salona
Dio skripte:evo kod
CMD:kupivozilo(playerid, params[])
{
new string[128];
new sendername[MAX_PLAYER_NAME];
   if (Spectating[playerid][0]!=-1)
   {
       if (Carlist[playerid][Typ]==-1)
       {
           new price = Buylist[Spectating[playerid][0]][Price];
           if (price <= GetPlayerCash(playerid))
           {
new autohaus=Buylist[Spectating[playerid][0]][Autohaus];
          GivePlayerCash(playerid, - price);
Carlist[playerid][Cijena] = Buylist[Spectating[playerid][0]][Price];
PlayerInfo[playerid][pVoziloSpawnano] = 0;
          Carlist[playerid][Typ]=Spectating[playerid][0]; Carlist[playerid][X]=Carspawns[autohaus][X]; Carlist[playerid][Y]=Carspawns[autohaus][Y];
Carlist[playerid][Z]=Carspawns[autohaus][Z]; Carlist[playerid][Rotation]=Carspawns[autohaus][Rotation]; Carlist[playerid][Status]=1; Carlist[playerid][Lock]=0;
Carlist[playerid][Typ] = 1;
new otext[20];
if(PlayerInfo[playerid][pOvjeraPapira] == 0) { otext = "Nema"; }
strmid(Carlist[playerid][BrojRegistracije],otext, 0, strlen(otext), 255);
SetVehicleNumberPlate(Carlist[playerid][Carid], Carlist[playerid][BrojRegistracije]);
//-------------
new string1[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string1, sizeof(string1), "%s",sendername);
strmid(Carlist[playerid][Vlasnik], string1, 0, strlen(string1), 255);

//-------------
new Vozilo;
Vozilo = GetVehicleModel(Buylist[Spectating[playerid][0]][Carid]);
Carlist[playerid][VehModel] = Vozilo;
Carlist[playerid][Cijena] = Buylist[Spectating[playerid][0]][Price];
       SetVehicleParamsForAll(Buylist[Spectating[playerid][0]][Carid],0,0);
       TogglePlayerControllable(playerid,1);
TextDrawHideForPlayer(playerid, imevozila[playerid]);
TextDrawHideForPlayer(playerid, cijenavozila[playerid]);
TextDrawHideForPlayer(playerid, registracijavozila[playerid]);
VehicleSave(playerid);
       Spectating[playerid][0]=-1;
       RemovePlayerFromVehicle(playerid);
format(string,128,"Cestitamo! Kupio si novo vozilo za za %i$!",price);
SendClientMessage(playerid, 0x8888C4FF, string);
SendClientMessage(playerid, 0x9191C8FF, "Ako ti se vozilo unisti kucaj /v popravi da ga popravis.");
SendClientMessage(playerid, 0x9B9BCDFF, "Vozila nestaju kada se diskonektujete sa servera.");
SendClientMessage(playerid, 0xA2A2D0FF, "Vracaju se nakon sto se vi konektujete.");
SendClientMessage(playerid, 0xAEAED6FF, "Ostalo: (/v)ozilo.");
SendClientMessage(playerid, 0xB9B9DBFF, "Kucaj /v spawn da spawnas vozilo, samo pazi da nema objekata u blizini.");
SendClientMessage(playerid, 0xC0C0DEFF, "Cuvaj ovo vozilo, i naravno puno srece sa njim!");
}
               else { format(string, 128, "Nemas dovoljno novca! ($%i)!", price); SendClientMessage(playerid, COLOR_LIGHTRED, string); }
}
else { SendClientMessage(playerid, COLOR_GREY, "Vec imas vozilo"); }
   }
   else { SendClientMessage(playerid, COLOR_GREY, "Nisi u izlozbenom vozilu!"); }
   return 1;
}

#if defined RESETCARS


EDIT:
Sretna nova svima
Poslednja Izmena: Januar 01, 2012, 14:20:09 POSLE PODNE od sandman12wolf
<a href="http://tinypic.com?ref=5l2yrb" target="_blank"><img src="http://i47.tinypic.com/5l2yrb.png" border="0" alt="Image and video hosting by TinyPic"></a>