new be;public OnGameModeInit(){ be = CreatePickup(pickupid, 2, x, y, z);}public OnPlayerPickUpPickup(playerid, pickupid){ if(pickupid == be) { SendClientMessage(playerid, 0xFF3366FF, \"Belépés: /enter\"); }return 1;}public OnPlayerCommandText( playerid, cmdtext[ ] ){if(!strcmp(\"/enter\", cmdtext, true) ){SetPlayerInterior(playerid,InteriorID); return 1;}return 0;} És így meg kell csinálni a kimenetélnél is.
new be;public OnGameModeInit(){ be = CreatePickup(pickupid, 2, x, y, z);}public OnPlayerPickUpPickup(playerid, pickupid){ if(pickupid == be) { SendClientMessage(playerid, 0xFF3366FF, \"Belépés: /enter\"); }return 1;}public OnPlayerCommandText( playerid, cmdtext[ ] ){if(!strcmp(\"/enter\", cmdtext, true) ){SetPlayerInterior(playerid,InteriorID); return 1;}return 0;}
OnPlayerCommandText(playerid, cmdtext[]){ if(!strcmp(\"/enter\", cmdtext, true)) { if(IsPlayerInRangeOfPoint(playerid, hatótáv, x koordi, y koordi, z koordi)) //Ahol lennie kell { SetPlayerPos(playerid, X, Y, Z); // Megváltoztatja a pozicioját SetPlayerInterior(playerid, interior); // Beállítja a játékos interiorját return 1; } }}
public OnPlayerCommandText(playerid, cmdtext[]){ if(strcmp(cmdtext, \"/enter\", true) == 0){if(IsPlayerInRangeOfPoint(playerid, 7.0,1836.2031,-1682.4124,13.3578)) //Ahol lennie kell { SetPlayerPos(playerid, 384.808624,173.804992,1008.382812); // Megváltoztatja a pozicioját SetPlayerInterior(playerid, 3); // Beállítja a játékos interiorját return 1; } }return 0;}
C:\\Users\\Zsombi\\Desktop\\[HUN]NeoRPG\\gamemodes\\Neo.pwn(269) : warning 217: loose indentationPawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Warning.
{{ { }}}
public OnPlayerCommandText(playerid, cmdtext[]){ if(strcmp(cmdtext, \"/enter\", true) == 0){ {if(IsPlayerInRangeOfPoint(playerid, 7.0,1836.2031,-1682.4124,13.3578)) //Ahol lennie kell { SetPlayerPos(playerid, 384.808624,173.804992,1008.382812); // Megváltoztatja a pozicioját SetPlayerInterior(playerid, 3); // Beállítja a játékos interiorját return 1;}return 0;}
public OnPlayerCommandText(playerid, cmdtext[]){ if(strcmp(cmdtext, \"/enter\", true) == 0){ {if(IsPlayerInRangeOfPoint(playerid, 7.0,1836.2031,-1682.4124,13.3578)) //Ahol lennie kell { SetPlayerPos(playerid, 384.808624,173.804992,1008.382812); // Megváltoztatja a pozicioját SetPlayerInterior(playerid, 3); // Beállítja a játékos interiorját return 1;}return 0;} Ez szerintem inkább így helyes.
public OnPlayerCommandText(playerid, cmdtext[]){ if(strcmp(cmdtext, \"/enter\", true) == 0){ {if(IsPlayerInRangeOfPoint(playerid, 7.0,1836.2031,-1682.4124,13.3578)) /CBA { SetPlayerPos(playerid, 384.808624,173.804992,1008.382812); // Megváltoztatja a pozicioját SetPlayerInterior(playerid, 3); // Beállítja a játékos interiorját return 1;} else if if(IsPlayerInRangeOfPoint(playerid, 7.0,600.2031,-1682.4124,13.3578)) // TESCO SetPlayerPos(playerid, 384.808624,173.804992,1008.382812); // Megváltoztatja a pozicioját SetPlayerInterior(playerid, 3); // Beállítja a játékos interiorját return 1;} else if if(IsPlayerInRangeOfPoint(playerid, 7.0,800.2031,-1682.4124,13.3578)) // ALDI (és így lehet folytatni amíg akarod) SetPlayerPos(playerid, 384.808624,173.804992,1008.382812); // Megváltoztatja a pozicioját SetPlayerInterior(playerid, 3); // Beállítja a játékos interiorját return 1; }return 0;}
if(strcmp(cmdtext, \"/enter\", true) == 0)//vhbe{if(IsPlayerInRangeOfPoint(playerid, 1.0, 1480.9397,-1771.5724,18.7958)) { SetPlayerPos(playerid,384.808624,173.804992,1008.382812); SetPlayerInterior(playerid,3);}return 1;}else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1554.9406,-1675.6411,16.1953)) SetPlayerPos(playerid,246.783996,63.900199,1003.640625); SetPlayerInterior(playerid,6);}return 1;}
C:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(907) : warning 217: loose indentationC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(908) : warning 209: function \"OnPlayerCommandText\" should return a valueC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(909) : error 010: invalid function or declarationC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(912) : error 010: invalid function or declarationC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(914) : error 010: invalid function or declarationC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(919) : error 010: invalid function or declarationC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(921) : error 010: invalid function or declarationPawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 5 Errors.
if(strcmp(cmdtext, \"/enter\", true) == 0)//vhbe{if(IsPlayerInRangeOfPoint(playerid, 1.0, 1480.9397,-1771.5724,18.7958)) { SetPlayerPos(playerid,384.808624,173.804992,1008.382812); SetPlayerInterior(playerid,3); return 1;}}else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1554.9406,-1675.6411,16.1953)) SetPlayerPos(playerid,246.783996,63.900199,1003.640625); SetPlayerInterior(playerid,6); return 1;}}
C:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(904) : warning 217: loose indentationC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(909) : warning 217: loose indentationC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(910) : warning 217: loose indentationC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(912) : error 054: unmatched closing brace (\"}\")C:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(914) : error 010: invalid function or declarationC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(916) : error 010: invalid function or declarationC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(921) : error 010: invalid function or declarationC:\\Users\\Zsombi\\Desktop\\Neo City\\gamemodes\\rpg.pwn(923) : error 010: invalid function or declarationPawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 5 Errors.
if(strcmp(cmdtext, \"/enter\", true) == 0)//vhbe{ if(IsPlayerInRangeOfPoint(playerid, 1.0, 1480.9397,-1771.5724,18.7958)) { SetPlayerPos(playerid,384.808624,173.804992,1008.382812); SetPlayerInterior(playerid,3); } else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1554.9406,-1675.6411,16.1953)) { SetPlayerPos(playerid,246.783996,63.900199,1003.640625); SetPlayerInterior(playerid,6); } return 1;}