31.01.2014, 20:39
Hello everybody. I have a question about strcmp. Is it possible to use strcmp in strcmp ? Example is down there.
Код:
else if(strcmp(odabir, "buy", true) == 0) { new slot[3], ime[15]; if(sscanf(params, "is", slot, ime)) return SCM(playerid, color_red, "[GREЉKA]"col_white" - Niste unijeli sve paramtere komande. Koriљtenje komande: /car buy [Slot]"); { if(strcmp(slot, "1", true) == 0) { if(strcmp(ime, "landstalker", true) == 0) { new car, novacstr[64]; if(!(GetPlayerMoney(playerid) >= 25000)) return SCM(playerid, color_red, "[GREЉKA]"col_white" - Ovo vozilo koљta $25.000. Nemate dovoljno novaca za kupovinu."); for(new i = 0; i < sizeof(CarData); ++i) { if(!fexist(CarPath(i))) car = i; break; } CarData[PlayerVeh[playerid]][cModel] = 400; strmid(CarData[car][cVlasnik], GetName(playerid), 0, strlen(GetName(playerid)), 24); CarData[PlayerVeh[playerid]][cBoja] = 0; //CarData[PlayerVeh[playerid]][cKreiranje] = CreateVehicle(527, pos[0], pos[1], pos[2], pos[3], 0, 0, 300); CarData[PlayerVeh[playerid]][cKreiranje] = CreateVehicle(400, 0.000, 0.000, 0.000, 0.000, 0, 0, 300); GivePlayerMoney(playerid, -25000); SacuvajVozilo(PlayerVeh[playerid]); PlayerVeh[playerid] = car; SCM(playerid, color_skyblue, "[BUY]"col_white" - Kupili ste Landstalkera. Ћelimo vam sreću."); format(novacstr, sizeof(novacstr), "Igrac %s je kupio Landstalkera za 25.000$.", GetName(playerid)); Logovi("Novac", novacstr); } } } }