23.03.2013, 14:10
HELP Then how to convert commands YSI to strcmp or ZCMD like this CMD
Quote:
YCMD:kreirajkucu(playerid, params[],help) { #pragma unused help if(!IsPlayerAdmin(playerid)) return SCM(playerid,-1,"[HS] "CRVENA"Nemate ovlastenje za koriscenje ove komande!"); new idkuce,vrsta,level,cena,Float:X,Float:Y,Float:Z,fk uce[80],string[400]; GetPlayerPos(playerid,X,Y,Z); if(sscanf(params, "iiii",idkuce,vrsta,level,cena)) return SCM(playerid,-1,""CRVENA"HS | "SIVA"/kreirajkucu [ID] [Vrsta] [Level] [Cena]"); if(idkuce >= MAX_KUCA) return SCM(playerid,-1, ""CRVENA"HS | "SIVA"Maximum kuca je ogranicen ne mozes koristiti taj ID!"); format(fkuce, sizeof(fkuce), KUCE_FILE, idkuce); if(fexist(fkuce)) return SCM(playerid,-1, "HS | "SPLAVA"ID te kuce vec postoji!"); if(vrsta == 0) // MALA KUCA { KucaInfo[idkuce][kIzlazX] = 223.043991; KucaInfo[idkuce][kIzlazY] = 1289.259888; KucaInfo[idkuce][kIzlazZ] = 1082.199951; KucaInfo[idkuce][kInt] = 1; strmid(KucaInfo[idkuce][kVrsta],"Mala Kuca",0,strlen("Mala Kuca"),255); KucaInfo[idkuce][kPromenaIntKuce] = 1; } else if(vrsta == 1) // SREDNJA KUCA { KucaInfo[idkuce][kIzlazX] = 225.756989; KucaInfo[idkuce][kIzlazY] = 1240.000000; KucaInfo[idkuce][kIzlazZ] = 1082.149902; KucaInfo[idkuce][kInt] = 2; strmid(KucaInfo[idkuce][kVrsta],"Srednja Kuca",0,strlen("Srednja Kuca"),255); KucaInfo[idkuce][kPromenaIntKuce] = 2; } else if(vrsta == 2) // VELIKA KUCA { KucaInfo[idkuce][kIzlazX] = 235.508994; KucaInfo[idkuce][kIzlazY] = 1189.169897; KucaInfo[idkuce][kIzlazZ] = 1080.339966; KucaInfo[idkuce][kInt] = 3; strmid(KucaInfo[idkuce][kVrsta],"Velika Kuca",0,strlen("Velika Kuca"),255); KucaInfo[idkuce][kPromenaIntKuce] = 3; } KucaInfo[idkuce][kCena] = cena; KucaInfo[idkuce][kLevel] = level; KucaInfo[idkuce][kUlazX] = X; KucaInfo[idkuce][kSkin] = -1; KucaInfo[idkuce][kUlazY] = Y; KucaInfo[idkuce][kUlazZ] = Z; KucaInfo[idkuce][kProveraVlasnika] = 0; KucaInfo[idkuce][kHeal] = 0; KucaInfo[idkuce][kNovac] = 0; KucaInfo[idkuce][kZatvoreno] = 1; KucaInfo[idkuce][kVW] = idkuce; KucaInfo[idkuce][kZvono] = 0; KucaInfo[idkuce][kOruzije] = -1; KucaInfo[idkuce][kMunicija] = 0; KucaInfo[idkuce][kRent] = 0; strmid(KucaInfo[idkuce][kVlasnik],"Niko",0,strlen("Niko"),255); strmid(KucaInfo[idkuce][kIme],"Default",0,strlen("Default"),255); format(string,sizeof(string),""ZELENA"Kuca na Prodaju!\nVrsta: "BELA"%s\n"ZELENA"Cena: "BELA"%d\n"ZELENA"Level: "BELA"%d\n"ZELENA"ID Kuce: "BELA"%d\n"ZELENA"Za kupovinu /kupikucu",KucaInfo[idkuce][kVrsta],KucaInfo[idkuce][kCena],KucaInfo[idkuce][kLevel],idkuce); KucaLabel[idkuce] = Create3DTextLabel(string ,0x33CCFFAA,X,Y,Z,25,0,1); KucaPickup[idkuce] = CreatePickup(1273, 1, KucaInfo[idkuce][kUlazX], KucaInfo[idkuce][kUlazY], KucaInfo[idkuce][kUlazZ]); SCM(playerid,-1,""SIVA"Kuca je uspesno kreirana!"); SacuvajKucu(idkuce); return 1; } |