Jump to content

-K-ing

Uživatel
  • Příspěvků

    9
  • Registrován

  • Aktivní

Reputace

0 Na nule
  1. if(strcmp(cmdtext,"/teleport",true) == 0) { if(GetPlayerMoney(playerid)>=1000) { if(IsPlayerInRangeOfPoint(playerid 3,231.1188,2017.8610,18.8266)|| -134.2494,990.2433,20.8266) || -1481.2926,2537.2986,57.8266) || -175.4669,2643.7397,64.8266)) { SetPlayerPos(playerid,142.2588,911.6749,798.9789); SendClientMessage(playerid, COLOR_RED , "Welcome on the plane!"); GivePlayerMoney (playerid, -1000); GivePlayerWeapon(playerid,46,1); } else { SendClientMessage(playerid,COLOR_RED,"You Don't have enough money or you are not at heli!"); } return 1; } a hadze mi to tieto errory C:\Users\Jozef\Desktop\COD.pwn(1247) : error 001: expected token: ",", but found "-integer value-" C:\Users\Jozef\Desktop\COD.pwn(1247) : warning 215: expression has no effect C:\Users\Jozef\Desktop\COD.pwn(1247) : warning 215: expression has no effect C:\Users\Jozef\Desktop\COD.pwn(1247) : warning 215: expression has no effect C:\Users\Jozef\Desktop\COD.pwn(1247) : warning 215: expression has no effect C:\Users\Jozef\Desktop\COD.pwn(1247) : error 001: expected token: ";", but found ")" C:\Users\Jozef\Desktop\COD.pwn(1247) : error 029: invalid expression, assumed zero C:\Users\Jozef\Desktop\COD.pwn(1247) : fatal error 107: too many error messages on one line
  2. CC all. Snazim sa spravit novy mod a potrebujem pomoc.Takze chcel by som to tak spravit ze ked hrate tak vam na obrazovke: napr. vedla mapy pise neak text (ip serveru, alebo meno serveru). Dik za pomoc! Aj vy ste sa raz ucili
  3. -K-ing

    pomoc [Help CMD]

    Dik kamo. Ide to a teraz sup na druhe veci? Mam toto neak lockunt alebo?
  4. -K-ing

    pomoc [Help CMD]

    Nemyslim si ze je to kvoli tym returnom, a nech sa paci teraz tu mate aj cisla lini: 1132 if(strcmp("/heal", cmd, true) == 0) { 1134 if (GetPlayerTeam(playerid) == MEDICA) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { 1139 return SendClientMessage(playerid,COLOR_LIGHTBLUE,"USAGE: /heal [id]"); } new id = strval(tmp); new pid = playerid; if(!IsPlayerConnected(id)) { 1145 return SendClientMessage(playerid,COLOR_GREY,"Cmd: This player is not online!"); } new Float:X,Float:Y,Float:Z, string[128], name[MAX_PLAYER_NAME]; GetPlayerName(id,name,128); GetPlayerPos(id,X,Y,Z); if(IsPlayerInRangeOfPoint(playerid,3,X,Y,Z)) { format(string,128,"[iNFO] Medic %s[%d] has healed you!", name, pid); SetPlayerHealth(id,100); SendClientMessage(id,COLOR_GREY,string); return 1; } else { SendClientMessage(playerid,COLOR_RED,"You're not near the player!"); } } else { SendClientMessage(playerid,COLOR_GREY,"You're not a Medic!"); return 1; } if(strcmp("/heal", cmd, true) == 0) { if (GetPlayerTeam(playerid) == MEDICA) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { return SendClientMessage(playerid,COLOR_LIGHTBLUE,"USAGE: /heal [id]"); } new id = strval(tmp); new pid = playerid; if(!IsPlayerConnected(id)) { return SendClientMessage(playerid,COLOR_GREY,"Cmd: This player is not online!"); } new Float:X,Float:Y,Float:Z, string[128], name[MAX_PLAYER_NAME]; GetPlayerName(id,name,128); GetPlayerPos(id,X,Y,Z); if(IsPlayerInRangeOfPoint(playerid,3,X,Y,Z)) { format(string,128,"[iNFO] Medic %s[%d] has healed you!", name, pid); SetPlayerHealth(id,100); SendClientMessage(id,COLOR_GREY,string); return 1; } else { SendClientMessage(playerid,COLOR_RED,"You're not near the player!"); } } else { SendClientMessage(playerid,COLOR_GREY,"You're not a Medic!"); return 1; } return 0; 1203 }
  5. -K-ing

    pomoc [Help CMD]

    Stale mi to vyhazduje ten error. Inak nevsimajte si ze mam tak vela prikazov pre /heal lebo je to pre kazdy typ medica. public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/rules", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid,501,DIALOG_STYLE_MSGBOX,"Rules","We still haven't determined rules!","Continue",""); return 1; } if (strcmp("/cmds", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid,502,DIALOG_STYLE_MSGBOX,"Commands","To jump from plane on country: /jump (nameofcountry)!","Continue",""); return 1; } if (strcmp("/jump russia", cmdtext, true, 10) == 0) { SetPlayerPos(playerid,329.8478,2264.8193,798.9803); SendClientMessage(playerid, COLOR_RED , "Welcome on the plane, Soldier!"); GivePlayerMoney (playerid, -500); GivePlayerWeapon(playerid,46,1); return 1; } if (strcmp("/jump usa", cmdtext, true, 10) == 0) { SetPlayerPos(playerid,142.2588,911.6749,798.9789); SendClientMessage(playerid, COLOR_RED , "Welcome on the plane, Soldier!"); GivePlayerMoney (playerid, -500); GivePlayerWeapon(playerid,46,1); return 1; } if (strcmp("/jump china", cmdtext, true, 10) == 0) { SetPlayerPos(playerid,-221.2448,3094.3801,798.9850); SendClientMessage(playerid, COLOR_RED , "Welcome on the plane, Soldier!"); GivePlayerMoney (playerid, -500); GivePlayerWeapon(playerid,46,1); return 1; } if (strcmp("/jump afganistan", cmdtext, true, 10) == 0) { SetPlayerPos(playerid,-1004.8002,1525.3109,798.9979); SendClientMessage(playerid, COLOR_RED , "Welcome on the plane, Soldier!"); GivePlayerMoney (playerid, -500); GivePlayerWeapon(playerid,46,1); return 1; } if (strcmp("/jump germany", cmdtext, true, 10) == 0) { SetPlayerPos(playerid,-1467.0762,2258.9370,798.9788); SendClientMessage(playerid, COLOR_RED , "Welcome on the plane, Soldier!"); GivePlayerMoney (playerid, -500); GivePlayerWeapon(playerid,46,1); return 1; } if(strcmp("/heal", cmd, true) == 0) { if (GetPlayerTeam(playerid) == MEDICR) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { return SendClientMessage(playerid,COLOR_LIGHTBLUE,"USAGE: /heal [id]"); } new id = strval(tmp); new pid = playerid; if(!IsPlayerConnected(id)) { return SendClientMessage(playerid,COLOR_GREY,"Cmd: This player is not online!"); } new Float:X,Float:Y,Float:Z, string[128], name[MAX_PLAYER_NAME]; GetPlayerName(id,name,128); GetPlayerPos(id,X,Y,Z); if(IsPlayerInRangeOfPoint(playerid,3,X,Y,Z)) { format(string,128,"[iNFO] Medic %s[%d] has healed you!", name, pid); SetPlayerHealth(id,100); SendClientMessage(id,COLOR_GREY,string); return 1; } else { SendClientMessage(playerid,COLOR_RED,"You're not near the player!"); } } else { SendClientMessage(playerid,COLOR_GREY,"You're not a Medic!"); return 1; } if(strcmp("/heal", cmd, true) == 0) { if (GetPlayerTeam(playerid) == MEDICU) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { return SendClientMessage(playerid,COLOR_LIGHTBLUE,"USAGE: /heal [id]"); } new id = strval(tmp); new pid = playerid; if(!IsPlayerConnected(id)) { return SendClientMessage(playerid,COLOR_GREY,"Cmd: This player is not online!"); } new Float:X,Float:Y,Float:Z, string[128], name[MAX_PLAYER_NAME]; GetPlayerName(id,name,128); GetPlayerPos(id,X,Y,Z); if(IsPlayerInRangeOfPoint(playerid,3,X,Y,Z)) { format(string,128,"[iNFO] Medic %s[%d] has healed you!", name, pid); SetPlayerHealth(id,100); SendClientMessage(id,COLOR_GREY,string); return 1; } else { SendClientMessage(playerid,COLOR_RED,"You're not near the player!"); } } else { SendClientMessage(playerid,COLOR_GREY,"You're not a Medic!"); return 1; } if(strcmp("/heal", cmd, true) == 0) { if (GetPlayerTeam(playerid) == MEDICC) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { return SendClientMessage(playerid,COLOR_LIGHTBLUE,"USAGE: /heal [id]"); } new id = strval(tmp); new pid = playerid; if(!IsPlayerConnected(id)) { return SendClientMessage(playerid,COLOR_GREY,"Cmd: This player is not online!"); } new Float:X,Float:Y,Float:Z, string[128], name[MAX_PLAYER_NAME]; GetPlayerName(id,name,128); GetPlayerPos(id,X,Y,Z); if(IsPlayerInRangeOfPoint(playerid,3,X,Y,Z)) { format(string,128,"[iNFO] Medic %s[%d] has healed you!", name, pid); SetPlayerHealth(id,100); SendClientMessage(id,COLOR_GREY,string); return 1; } else { SendClientMessage(playerid,COLOR_RED,"You're not near the player!"); } } else { SendClientMessage(playerid,COLOR_GREY,"You're not a Medic!"); return 1; } if(strcmp("/heal", cmd, true) == 0) { if (GetPlayerTeam(playerid) == MEDICA) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { return SendClientMessage(playerid,COLOR_LIGHTBLUE,"USAGE: /heal [id]"); } new id = strval(tmp); new pid = playerid; if(!IsPlayerConnected(id)) { return SendClientMessage(playerid,COLOR_GREY,"Cmd: This player is not online!"); } new Float:X,Float:Y,Float:Z, string[128], name[MAX_PLAYER_NAME]; GetPlayerName(id,name,128); GetPlayerPos(id,X,Y,Z); if(IsPlayerInRangeOfPoint(playerid,3,X,Y,Z)) { format(string,128,"[iNFO] Medic %s[%d] has healed you!", name, pid); SetPlayerHealth(id,100); SendClientMessage(id,COLOR_GREY,string); return 1; } else { SendClientMessage(playerid,COLOR_RED,"You're not near the player!"); } } else { SendClientMessage(playerid,COLOR_GREY,"You're not a Medic!"); return 1; } if(strcmp("/heal", cmd, true) == 0) { if (GetPlayerTeam(playerid) == MEDICA) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { return SendClientMessage(playerid,COLOR_LIGHTBLUE,"USAGE: /heal [id]"); } new id = strval(tmp); new pid = playerid; if(!IsPlayerConnected(id)) { return SendClientMessage(playerid,COLOR_GREY,"Cmd: This player is not online!"); } new Float:X,Float:Y,Float:Z, string[128], name[MAX_PLAYER_NAME]; GetPlayerName(id,name,128); GetPlayerPos(id,X,Y,Z); if(IsPlayerInRangeOfPoint(playerid,3,X,Y,Z)) { format(string,128,"[iNFO] Medic %s[%d] has healed you!", name, pid); SetPlayerHealth(id,100); SendClientMessage(id,COLOR_GREY,string); return 1; } else { SendClientMessage(playerid,COLOR_RED,"You're not near the player!"); } } else { SendClientMessage(playerid,COLOR_GREY,"You're not a Medic!"); return 1; } return 0; } a vyhadzuje mi to tento error: C:\Users\Jozef\Desktop\FUn.pwn(1204) : error 030: compound statement not closed at the end of file (started at line 1134) Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Error. mozete mi to pls upravit a poslat lebo fakt newiem preco to robi..
  6. -K-ing

    pomoc [Help CMD]

    dik ale ani ten tvoj define nefunguje
  7. -K-ing

    pomoc [Help CMD]

    Chcel by som dat jednu vec z netu do modu ale mam malicky problem. Neviem ako definovat cmd, strtok,tmp a IsPlayerInRangeOfPoint? A keby sa dalo mohli by ste mi pomoct s warningmy: Moj kod pod CommandText: if(strcmp("/heal", cmd, true) == 0) { if (GetPlayerTeam(playerid) == MEDIC) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { return SendClientMessage(playerid,COLOR_LIGHTBLUE,"USAGE: /heal [id]"); } new id = strval(tmp); new pid = playerid; if(!IsPlayerConnected(id)) { return SendClientMessage(playerid,COLOR_GREY,"AdmCmd: This player is not online!"); } new Float:X,Float:Y,Float:Z, string[128], name[MAX_PLAYER_NAME]; GetPlayerName(id,name,128); GetPlayerPos(id,X,Y,Z); if(IsPlayerInRangeOfPoint(playerid,3,X,Y,Z)) { format(string,128,"[iNFO] Medic %s[%d] has healed you!", name, pid); SetPlayerHealth(id,100); SendClientMessage(id,COLOR_GREY,string); return 1; } else { SendClientMessage(playerid,COLOR_RED,"You're not near the player!"); } } else { SendClientMessage(playerid,COLOR_GREY,"You're not a Medic!"); return 1; } } a errory plus warningy ktore dostanem: C:\Users\Jozef\Desktop\FUn.pwn(1007) : error 017: undefined symbol "cmd" C:\Users\Jozef\Desktop\FUn.pwn(1011) : error 017: undefined symbol "tmp" C:\Users\Jozef\Desktop\FUn.pwn(1011) : error 017: undefined symbol "strtok" C:\Users\Jozef\Desktop\FUn.pwn(1012) : error 017: undefined symbol "tmp" C:\Users\Jozef\Desktop\FUn.pwn(1016) : error 017: undefined symbol "tmp" C:\Users\Jozef\Desktop\FUn.pwn(1025) : error 017: undefined symbol "IsPlayerInRangeOfPoint" C:\Users\Jozef\Desktop\FUn.pwn(1028) : warning 217: loose indentation C:\Users\Jozef\Desktop\FUn.pwn(1030) : warning 217: loose indentation C:\Users\Jozef\Desktop\FUn.pwn(1046) : error 030: compound statement not closed at the end of file (started at line 951) Diky za pomoc som este len novacik ale bavi ma pawno!
  8. -K-ing

    Teams

    Mam problem s teamamy. Ked ich sprawim a hodim na server, tak v class selection mi nepise po USA ze aky tim su... Neviete preco? Pawno: #include < a_samp > #define TEAM_RUSSIA ( 0 ) // Defines TEAM_BALLAS as team ID 0 #define TEAM_USA ( 1 ) // Defines TEAM_CJ as team ID 1 #define TEAM_CHINA ( 2 ) // definy ore cinu id 2 #define TEAM_AFGANISTAN ( 3 ) #define TEAM_GERMANY ( 4 ) public OnGameModeInit( ) { AddPlayerClass(125,344.9047,2023.7461,22.6406,111.9761,31,250,29,150,24,50); // RussianSpawn AddPlayerClass(287,-118.5791,1035.8478,19.7422,2.7585,30,250,29,150,24,50); // American Spawn // Multiply the classid + 1, so this class is classid 1. AddPlayerClass(122,-249.1797,2585.9741,63.5703,228.6695,31,250,29,150,24,50); // Chineese Soldier AddPlayerClass(30,-729.8787,1534.3965,40.1808,92.3812,30,250,29,150,24,50); // AfganistanSpawn AddPlayerClass(285,-1395.5115,2641.6504,55.8645,90.7408,31,250,29,150,24,50); // GermanSpawn A: public OnPlayerRequestClass( playerid, classid ) // This is called when a player is on class selection { SetPlayerInterior(playerid,0); SetPlayerPos( playerid, -1309.6177,2551.5730,90.3281); SetPlayerFacingAngle (playerid, 218.4951); SetPlayerCameraPos( playerid, -1306.3782, 2546.7903,90.6248); SetPlayerCameraLookAt( playerid, -1309.6177,2551.5730,90.3281); switch ( classid ) // This is like a if/elseif statement. { case 0: // If the classid is 0 { // Then SetPlayerTeam( playerid, TEAM_RUSSIA ); } case 1: // If the classid is 1 { // Then GameTextForPlayer( playerid, " ~b~ USA", 500, 3 ); SetPlayerTeam( playerid, TEAM_USA ); } case 2: // If the classid is 2 { // Then GameTextForPlayer( playerid, " ~y~ CHINA ", 500, 3 ); SetPlayerTeam( playerid, TEAM_CHINA ); } case 3: // If the classid is 2 { // Then GameTextForPlayer( playerid, " ~l~ AFGANISTAN ", 500, 3 ); SetPlayerTeam( playerid, TEAM_AFGANISTAN ): } case 4: // If the classid is 2 { // Then GameTextForPlayer( playerid, " ~g~ GERMANY ", 500, 3 ); SetPlayerTeam( playerid, TEAM_GERMANY ); } } return 1; A nehadze to ziadne errory len to neukazuje Ako sa volaju timi v class selection... dik za pomoc
×
×
  • Create New...