Guest scopers Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 ahojte hldam niekoho kto by mi spravil jeden prikaz pre automechanika prikaz by mal vyzerat tak ze ked da automechanik /oprav [id hraca] tak by to opravilo vozidla tomu hracovi. Dakujem Link to comment Share on other sites More sharing options...
zpatecnik 0 Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 dcmd_opravit(playerid, params[]) { if(Povolani[playerid] == 2) { if(!strlen(params)) return SendClientMessage(playerid,COLOR_WHITE, "Pouzitij /opravit [iD]."); new tuhej = strval(params); if(!IsPlayerConnected(tuhej)) return SendClientMessage(playerid,COLOR_RED, "Toto id neni na serveru."); if(!IsPlayerInAnyVehicle(tuhej)) return SendClientMessage(playerid,COLOR_RED, "Hrac neni ve vozidle."); RepairVehicle(GetPlayerVehicleID(tuhej)); new string[256]; format(string, sizeof(string), "Automechanik %s ti opravil auto.",PlayerName(playerid)); SendClientMessage(tuhej,COLOR_WHITE,string); } return true; } + Dopln svoji promenou Link to comment Share on other sites More sharing options...
Patrony 0 Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 dcmd_opravit(playerid, params[]) { if(Povolani[playerid] == 2) { if(!strlen(params)) return SendClientMessage(playerid,COLOR_WHITE, "Pouzitij /opravit [iD]."); new tuhej = strval(params); if(!IsPlayerConnected(tuhej)) return SendClientMessage(playerid,COLOR_RED "Toto id neni na serveru."); if(!IsPlayerInAnyVehicle(tuhej)) return SendClientMessage(playerid,COLOR_RED "Hrac neni ve vozidle."); RepairVehicle(GetPlayerVehicleID(tuhej)); new string[256]; format(string, sizeof(string), "Automechanik %s ti opravil auto.",PlayerName(playerid)); SendClientMessage(tuhej,COLOR_WHITE,string); } return true; } + Dopln svoji promenou zajímavej název proměnny "tuhej" "lol" jinak by asi bylo lepší tam nedávat definici nějaké barvy ale přímo barvu, a je tam chyba má to být SendClientMessage(playerid,COLOR_RED, "Toto id neni na serveru."); Link to comment Share on other sites More sharing options...
zpatecnik 0 Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 Mas pravdu chybej dve carky Link to comment Share on other sites More sharing options...
Patrony 0 Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 Jo ale víš jak by to dopadlo :-D zas by tu spamoval že mu to hází errory tag mišmaš :-D Link to comment Share on other sites More sharing options...
Guest scopers Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 no mam to ale teraz mi to hadze par errorou if(!IsPlayerConnected(oprav)) return SendClientMessage(playerid,0xFF8C00AA "Toto id neni na servery."); C:\DOCUME~1\peto\Plocha\hodywood.pwn(9817) : error 001: expected token: ",", but found "-string-" C:\DOCUME~1\peto\Plocha\hodywood.pwn(9817) : warning 215: expression has no effect C:\DOCUME~1\peto\Plocha\hodywood.pwn(9817) : error 001: expected token: ";", but found ")" C:\DOCUME~1\peto\Plocha\hodywood.pwn(9817) : error 029: invalid expression, assumed zero C:\DOCUME~1\peto\Plocha\hodywood.pwn(9817) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 4 Errors. Link to comment Share on other sites More sharing options...
zpatecnik 0 Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 Jako by to patrony nerikal xD if(!IsPlayerConnected(oprav)) return SendClientMessage(playerid,0xFF8C00AA, "Toto id neni na servery."); To ma clovek z toho ze kopiruje veci ze svyho modu a snazi se zpravy prez TextDraw predelat na SCM Mimochodem expected token: "," by si snad prelozit moh ne? Link to comment Share on other sites More sharing options...
Guest scopers Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 no dobre mam to teraz mi to hadze este viac errorou nespravi mi to niekddo cez teamwiever? alebo ked mu to poslem? diki Link to comment Share on other sites More sharing options...
biohazard545 0 Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 no dobre mam to teraz mi to hadze este viac errorou nespravi mi to niekddo cez teamwiever? alebo ked mu to poslem?diki omg... scopers je tu plno tutov , hladaj ... :spam: EDIT: hned nieco najdem... , cakaj... Link to comment Share on other sites More sharing options...
Guest scopers Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 ale nie na automechanika Link to comment Share on other sites More sharing options...
biohazard545 0 Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 tuto to mas , malo by to fungovat... if(strcmp(cmdtext, "/repair", true) == 0) { if (vehicleid > 0) { SetVehicleHealth(vehicleid,1000.0); RepairVehicle(vehicleid); SendClientMessage(playerid,COLOR_BLACK,"Opravil si si auto."); } return 1; } ak nie ... tak hladaj . Link to comment Share on other sites More sharing options...
Guest Frodo Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 if(strcmp(cmdtext, "/repair", true) == 0) { if (vehicleid > 0) { SetVehicleHealth(vehicleid,1000.0); RepairVehicle(vehicleid); SendClientMessage(playerid,COLOR_BLACK,"Opravil si si auto."); } return 1; } Kde mas definovany "vecihleid" ?? Link to comment Share on other sites More sharing options...
zpatecnik 0 Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 no dobre mam to teraz mi to hadze este viac errorou nespravi mi to niekddo cez teamwiever? alebo ked mu to poslem?diki dcmd_opravit(playerid, params[]) { if(Povolani[playerid] == 2) { if(!strlen(params)) return SendClientMessage(playerid,0xE10000AA, "Pouzitij /opravit [iD]."); new tuhej = strval(params); if(!IsPlayerConnected(tuhej)) return SendClientMessage(playerid,0xE10000AA, "Toto id neni na serveru."); if(!IsPlayerInAnyVehicle(tuhej)) return SendClientMessage(playerid,0xE10000AA, "Hrac neni ve vozidle."); RepairVehicle(GetPlayerVehicleID(tuhej)); new string[256]; format(string, sizeof(string), "Automechanik %s ti opravil auto.",PlayerName(playerid)); SendClientMessage(tuhej,0xE10000AA,string); } return true; } Takhle ti to zadnou chybu hazet nemuze! TO BIOHAZARD: on chce opravovat autta ostatnim ne sobe... Link to comment Share on other sites More sharing options...
Guest Frodo Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 Haze mu to undefined Povolani a PlayerName urcite :P Link to comment Share on other sites More sharing options...
biohazard545 0 Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 Haze mu to undefined Povolani a PlayerName urcite :P to nech si vyriesi on , ja som mu to len nasiel EDIT: sry prehliadol som co chce... Link to comment Share on other sites More sharing options...
zpatecnik 0 Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 stock PlayerName(playerid) { new name[255]; GetPlayerName(playerid, name, 255); return name; } new Povolani[MAX_PLAYERS]; Myslel sem ze todle pochopi ale kdyz nedokazal ani doplnit carku Link to comment Share on other sites More sharing options...
Guest Frodo Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 Haze mu to undefined Povolani a PlayerName urcite :P to nech si vyriesi on , ja som mu to len nasiel Nemluvim o tom tvim kodu kterej je jeste spatne Link to comment Share on other sites More sharing options...
Guest scopers Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 no opravil som si to je to bez erroru aj bez warningu ale ked dam napr /oprav 5 tak sa nic nestane ani sa nic nevipise co dalej? Link to comment Share on other sites More sharing options...
zpatecnik 0 Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 no opravil som si to je to bez erroru aj bez warningu ale ked dam napr /oprav 5 tak sa nic nestane ani sa nic nevipise co dalej? Pokud das /opravit 5 tak to napise Toto id neni na serveru. Pokud si teda pouzil muj kod kde NENI co opravovat protoze je DOBŘE Link to comment Share on other sites More sharing options...
Guest Frodo Odesláno: 11. Únor, 2010 Share Odesláno: 11. Únor, 2010 if(Povolani[playerid] == TVOJE PROMENA) return SCM(playerid, BARVA, "Nejsi ..."); ... - Treba fízl ale musis si upravit ten kod protoze ted je to dělaný přes { } Link to comment Share on other sites More sharing options...
Recommended Posts