#include a_samp#include zcmd#include Dini#define MAX_GATES 20#define GATE_OBJECT 980#define GATE_STATE_CLOSED 0#define GATE_STATE_OPEN 1enum fs_gates{ gCreated, Float:gX, Float:gY, Float:gZ, Float:gA, gObject, gPlacedBy[24], gStatus, gPassword}new GateInfo[MAX_GATES][fs_gates];CMD:placegate( playerid, params[] ){ if( isnull( params) ) return SendClientMessage( playerid, -1, \"Syntax: /placegate [password]\" ); if( !strval( params ) ) return SendClientMessage( playerid, -1, \"You need to input numbers.\" ); if( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, -1, \"You need to exit your vehicle.\" ); new Float:pPos[4]; GetPlayerPos( playerid, pPos[0], pPos[1], pPos[2] ); GetPlayerFacingAngle( playerid, pPos[3] ); CreateGate( playerid, strval( params ), pPos[0], pPos[1], pPos[2], pPos[3] ); SendClientMessage( playerid, -1, \"You succesfully created a movable gate. Use /gopen or /gclose.\" ); return 1;}CMD:gopen( playerid, params[] ){ if( isnull( params ) ) return SendClientMessage( playerid, -1, \"Syntax: /gopen [password]\" ); new szName[24], gate = -1; GetPlayerName( playerid, szName, 24 ); for( new i = 0; i != MAX_GATES; i++ ) if( GateInfo[gCreated] == 1 ) if( strval( params ) == GateInfo[gPassword] ) { gate = i; break; } if( gate != -1 ) { if( !IsObjectMoving( GateInfo[gate][gObject] ) ) { if( IsPlayerInRangeOfPoint( playerid, 10.0, GateInfo[gate][gX], GateInfo[gate][gY], GateInfo[gate][gZ] ) ) { if( GateInfo[gate][gStatus] == GATE_STATE_CLOSED ) { MoveObject( GateInfo[gate][gObject], GateInfo[gate][gX], GateInfo[gate][gY], GateInfo[gate][gZ]-5.3, 7.0 ); SendClientMessage( playerid, -1, \"You opened the gate.\" ); } else return SendClientMessage( playerid, -1, \"The gate is already open.\" ); } else return SendClientMessage( playerid, -1, \"You\'re not near any gate.\" ); } else return SendClientMessage( playerid, -1, \"You must wait untill the gate has moved.\" ); } else return SendClientMessage( playerid, -1, \"Invalid password.\" ); return 1;}CMD:gclose( playerid, params[] ){ if( isnull( params ) ) return SendClientMessage( playerid, -1, \"Syntax: /gclose [password]\" ); new szName[24], gate = -1; GetPlayerName( playerid, szName, 24 ); for( new i = 0; i != MAX_GATES; i++ ) if( GateInfo[gCreated] == 1 ) if( strval( params ) == GateInfo[gPassword] ) { gate = i; break; } if( gate != -1 ) { if( !IsObjectMoving( GateInfo[gate][gObject] ) ) { if( IsPlayerInRangeOfPoint( playerid, 10.0, GateInfo[gate][gX], GateInfo[gate][gY], GateInfo[gate][gZ] ) ) { if( GateInfo[gate][gStatus] == GATE_STATE_OPEN ) { MoveObject( GateInfo[gate][gObject], GateInfo[gate][gX], GateInfo[gate][gY], GateInfo[gate][gZ]+5.3, 7.0 ); SendClientMessage( playerid, -1, \"You closed the gate.\" ); } else return SendClientMessage( playerid, -1, \"The gate is already closed.\" ); } else return SendClientMessage( playerid, -1, \"You\'re not near any gate.\" ); } else return SendClientMessage( playerid, -1, \"You must wait untill the gate has moved.\" ); } else return SendClientMessage( playerid, -1, \"Invalid password.\" ); return 1;}CMD:removegate( playerid, params[] ){ for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 1 ) { if( IsPlayerInRangeOfPoint( playerid, 10.0, GateInfo[gX], GateInfo[gY], GateInfo[gZ] ) ) { new szName[24]; GetPlayerName( playerid, szName, 24 ); if( !strcmp( szName, GateInfo[gPlacedBy], true ) || IsPlayerAdmin( playerid ) ) { DestroyObject( GateInfo[gObject] ); format( GateInfo[gPlacedBy], 24, \"None\" ); GateInfo[gCreated] = 0; GateInfo[gX] = 0.0; GateInfo[gY] = 0.0; GateInfo[gZ] = 0.0; GateInfo[gA] = 0.0; GateInfo[gPassword] = 0; GateInfo[gStatus] = GATE_STATE_CLOSED; SendClientMessage( playerid, -1, \"You removed the gate.\" ); new file[32]; format( file, 32, \"Gates/gate_%d.ini\", i ); if( dini_Exists( file ) ) dini_Remove( file ); break; } else return SendClientMessage( playerid, -1, \"You don\'t own this gate.\" ); } else return SendClientMessage( playerid, -1, \"You\'re not near any gate.\" ); } } return 1;}CMD:gateinfo( playerid, params[] ){ if( IsPlayerAdmin( playerid ) ) { for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 1 ) { if( IsPlayerInRangeOfPoint( playerid, 5.0, GateInfo[gX], GateInfo[gY], GateInfo[gZ] ) ) { new szString[128]; format( szString, 128, \"Gate Info( Placed by: %s | Password: %d)\", GateInfo[gPlacedBy], GateInfo[gPassword] ); SendClientMessage( playerid, -1, szString ); return 1; } else return SendClientMessage( playerid, -1, \"You\'re not near any gate.\" ); } } } else return SendClientMessage( playerid, -1, \"You\'re not an admin.\" ); return 1;}public OnFilterScriptInit( ){ for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 0 ) { new file[64]; format( file, 64, \"Gates/gate_%d.ini\", i ); if( fexist( file ) ) { GateInfo[gCreated] = 1; GateInfo[gX] = dini_Float( file, \"X\" ); GateInfo[gY] = dini_Float( file, \"Y\" ); GateInfo[gZ] = dini_Float( file, \"Z\" ); GateInfo[gA] = dini_Float( file, \"A\" ); GateInfo[gStatus] = dini_Int( file, \"Status\" ); GateInfo[gPassword] = dini_Int( file, \"Password\" ); format( GateInfo[gPlacedBy], 24, dini_Get( file, \"PlacedBy\" ) ); GateInfo[gObject] = CreateObject( GATE_OBJECT, GateInfo[gX], GateInfo[gY], GateInfo[gZ], 0, 0, GateInfo[gA] ); } } } return 1;}public OnFilterScriptExit( ){ for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 1 ) { new file[64]; format( file, 64, \"Gates/gate_%d.ini\", i ); if( fexist( file ) ) { dini_IntSet( file, \"Object\", GateInfo[gObject] ); dini_FloatSet( file, \"X\", GateInfo[gX] ); dini_FloatSet( file, \"Y\", GateInfo[gY] ); dini_FloatSet( file, \"Z\", GateInfo[gZ] ); dini_FloatSet( file, \"A\", GateInfo[gA] ); dini_IntSet( file, \"Status\", GateInfo[gStatus] ); dini_IntSet( file, \"Password\", GateInfo[gPassword] ); dini_Set( file, \"PlacedBy\", GateInfo[gPlacedBy] ); DestroyObject( GateInfo[gObject] ); format( GateInfo[gPlacedBy], 24, \"None\" ); GateInfo[gCreated] = 0; GateInfo[gX] = 0.0; GateInfo[gY] = 0.0; GateInfo[gZ] = 0.0; GateInfo[gA] = 0.0; GateInfo[gStatus] = GATE_STATE_CLOSED; } } } return 1;}public OnObjectMoved( objectid ){ for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 1 ) { if( GateInfo[gObject] == objectid ) { if( GateInfo[gStatus] == GATE_STATE_CLOSED ) GateInfo[gStatus] = GATE_STATE_OPEN; else if( GateInfo[gStatus] == GATE_STATE_OPEN ) GateInfo[gStatus] = GATE_STATE_CLOSED; // Update the variables. new Float:oPos[3]; GetObjectPos( objectid, oPos[0], oPos[1], oPos[2] ); GateInfo[gX] = oPos[0]; GateInfo[gY] = oPos[1]; GateInfo[gZ] = oPos[2]; break; } } } return 1;}stock CreateGate( playerid, password, Float:x, Float:y, Float:z, Float:a ){ for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 0 ) { new szName[24]; GetPlayerName( playerid, szName, 24 ); GateInfo[gObject] = CreateObject( GATE_OBJECT, x, y, z+1.5, 0, 0, a ); format( GateInfo[gPlacedBy], 24, \"%s\", szName ); GateInfo[gCreated] = 1; GateInfo[gX] = x; GateInfo[gY] = y; GateInfo[gZ] = z+1.5; // comment the +1.5 if you\'re not using object 980. GateInfo[gA] = a; GateInfo[gStatus] = GATE_STATE_CLOSED; GateInfo[gPassword] = password; SetPlayerPos( playerid, x+1, y+1, z ); new file[64]; format( file, 64, \"Gates/gate_%d.ini\", i ); if( !fexist( file ) ) { dini_Create( file ); dini_IntSet( file, \"Object\", GateInfo[gObject] ); dini_FloatSet( file, \"X\", GateInfo[gX] ); dini_FloatSet( file, \"Y\", GateInfo[gY] ); dini_FloatSet( file, \"Z\", GateInfo[gZ] ); dini_FloatSet( file, \"A\", GateInfo[gA] ); dini_IntSet( file, \"Status\", GateInfo[gStatus] ); dini_Set( file, \"PlacedBy\", GateInfo[gPlacedBy] ); } break; } }}
akkor valaki? [/quote]params-okat kicseréled cmdtext-re public OnPlayerCommandText(playerid, cmdtext[]) alá beírod a parancsokatif (strcmp(\"/parancs\", cmdtext, true, 10) == 0) kicseréled a CMD:parancs(playerid,params[])-okat ...
:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(28) : error 017: undefined symbol \"isnull\"D:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(40) : error 017: undefined symbol \"CreateGate\"D:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(48) : error 017: undefined symbol \"isnull\"D:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(67) : warning 217: loose indentationD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(78) : warning 217: loose indentationD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(90) : error 017: undefined symbol \"isnull\"D:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(109) : warning 217: loose indentationD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(120) : warning 217: loose indentationD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(144) : warning 217: loose indentationD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(153) : warning 217: loose indentationD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(199) : error 029: invalid expression, assumed zeroD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(199) : error 004: function \"OnFilterScriptInit\" is not implementedD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(210) : warning 217: loose indentationD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(225) : warning 225: unreachable codeD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(225) : error 029: invalid expression, assumed zeroD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(225) : error 004: function \"OnFilterScriptExit\" is not implementedD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(245) : warning 217: loose indentationD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(258) : warning 225: unreachable codeD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(258) : error 029: invalid expression, assumed zeroD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(258) : error 004: function \"OnObjectMoved\" is not implementedD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(264) : error 017: undefined symbol \"objectid\"D:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(272) : warning 217: loose indentationD:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(273) : error 017: undefined symbol \"objectid\"D:\\Játékok\\Blue World RPG\\filterscripts\\nex.pwn(275) : warning 217: loose indentationnex.pwn(277) : warning 217: loose indentation\\nex.pwn(282) : warning 217: loose indentationnex.pwn(285) : warning 225: unreachable codenex.pwn(285) : error 029: invalid expression, assumed zeronex.pwn(285) : error 017: undefined symbol \"CreateGate\"nex.pwn(294) : error 017: undefined symbol \"x\"nex.pwn(296) : warning 217: loose indentationnex.pwn(297) : error 017: undefined symbol \"x\"nex.pwn(298) : error 017: undefined symbol \"y\"nex.pwn(299) : error 017: undefined symbol \"z\"nex.pwn(300) : error 017: undefined symbol \"a\"nex.pwn(301) : warning 217: loose indentationnex.pwn(302) : error 017: undefined symbol \"password\"nex.pwn(303) : error 017: undefined symbol \"x\"nex.pwn(310) : warning 217: loose indentation\\nex.pwn(322) : error 030: compound statement not closed at the end of file (started at line 26)Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 22 Errors.
#include a_samp#include Dini#define MAX_GATES 20#define GATE_OBJECT 980#define GATE_STATE_CLOSED 0#define GATE_STATE_OPEN 1enum fs_gates{ gCreated, Float:gX, Float:gY, Float:gZ, Float:gA, gObject, gPlacedBy[24], gStatus, gPassword}new GateInfo[MAX_GATES][fs_gates];public OnPlayerCommandText(playerid, cmdtext[]){if (strcmp(\"/placegate\", cmdtext, true, 10) == 0){ if( isnull( cmdtext) ) return SendClientMessage( playerid, -1, \"Syntax: /placegate [password]\" ); if( !strval( cmdtext ) ) return SendClientMessage( playerid, -1, \"You need to input numbers.\" ); if( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, -1, \"You need to exit your vehicle.\" ); new Float:pPos[4]; GetPlayerPos( playerid, pPos[0], pPos[1], pPos[2] ); GetPlayerFacingAngle( playerid, pPos[3] ); CreateGate( playerid, strval( cmdtext ), pPos[0], pPos[1], pPos[2], pPos[3] ); SendClientMessage( playerid, -1, \"You succesfully created a movable gate. Use /gopen or /gclose.\" ); return 1;}if (strcmp(\"/gopen\", cmdtext, true, 10) == 0){ if( isnull( cmdtext ) ) return SendClientMessage( playerid, -1, \"Syntax: /gopen [password]\" ); new szName[24], gate = -1; GetPlayerName( playerid, szName, 24 ); for( new i = 0; i != MAX_GATES; i++ ) if( GateInfo[gCreated] == 1 ) if( strval( cmdtext ) == GateInfo[gPassword] ) { gate = i; break; } if( gate != -1 ) { if( !IsObjectMoving( GateInfo[gate][gObject] ) ) { if( IsPlayerInRangeOfPoint( playerid, 10.0, GateInfo[gate][gX], GateInfo[gate][gY], GateInfo[gate][gZ] ) ) { if( GateInfo[gate][gStatus] == GATE_STATE_CLOSED ) { MoveObject( GateInfo[gate][gObject], GateInfo[gate][gX], GateInfo[gate][gY], GateInfo[gate][gZ]-5.3, 7.0 ); SendClientMessage( playerid, -1, \"You opened the gate.\" ); } else return SendClientMessage( playerid, -1, \"The gate is already open.\" ); } else return SendClientMessage( playerid, -1, \"You\'re not near any gate.\" ); } else return SendClientMessage( playerid, -1, \"You must wait untill the gate has moved.\" ); } else return SendClientMessage( playerid, -1, \"Invalid password.\" ); return 1;}if (strcmp(\"/gclose\", cmdtext, true, 10) == 0){ if( isnull( cmdtext ) ) return SendClientMessage( playerid, -1, \"Syntax: /gclose [password]\" ); new szName[24], gate = -1; GetPlayerName( playerid, szName, 24 ); for( new i = 0; i != MAX_GATES; i++ ) if( GateInfo[gCreated] == 1 ) if( strval( cmdtext ) == GateInfo[gPassword] ) { gate = i; break; } if( gate != -1 ) { if( !IsObjectMoving( GateInfo[gate][gObject] ) ) { if( IsPlayerInRangeOfPoint( playerid, 10.0, GateInfo[gate][gX], GateInfo[gate][gY], GateInfo[gate][gZ] ) ) { if( GateInfo[gate][gStatus] == GATE_STATE_OPEN ) { MoveObject( GateInfo[gate][gObject], GateInfo[gate][gX], GateInfo[gate][gY], GateInfo[gate][gZ]+5.3, 7.0 ); SendClientMessage( playerid, -1, \"You closed the gate.\" ); } else return SendClientMessage( playerid, -1, \"The gate is already closed.\" ); } else return SendClientMessage( playerid, -1, \"You\'re not near any gate.\" ); } else return SendClientMessage( playerid, -1, \"You must wait untill the gate has moved.\" ); } else return SendClientMessage( playerid, -1, \"Invalid password.\" ); return 1;}if (strcmp(\"/removegate\", cmdtext, true, 10) == 0){ for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 1 ) { if( IsPlayerInRangeOfPoint( playerid, 10.0, GateInfo[gX], GateInfo[gY], GateInfo[gZ] ) ) { new szName[24]; GetPlayerName( playerid, szName, 24 ); if( !strcmp( szName, GateInfo[gPlacedBy], true ) || IsPlayerAdmin( playerid ) ) { DestroyObject( GateInfo[gObject] ); format( GateInfo[gPlacedBy], 24, \"None\" ); GateInfo[gCreated] = 0; GateInfo[gX] = 0.0; GateInfo[gY] = 0.0; GateInfo[gZ] = 0.0; GateInfo[gA] = 0.0; GateInfo[gPassword] = 0; GateInfo[gStatus] = GATE_STATE_CLOSED; SendClientMessage( playerid, -1, \"You removed the gate.\" ); new file[32]; format( file, 32, \"Gates/gate_%d.ini\", i ); if( dini_Exists( file ) ) dini_Remove( file ); break; } else return SendClientMessage( playerid, -1, \"You don\'t own this gate.\" ); } else return SendClientMessage( playerid, -1, \"You\'re not near any gate.\" ); } } return 1;}if (strcmp(\"/gateinfo\", cmdtext, true, 10) == 0){ if( IsPlayerAdmin( playerid ) ) { for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 1 ) { if( IsPlayerInRangeOfPoint( playerid, 5.0, GateInfo[gX], GateInfo[gY], GateInfo[gZ] ) ) { new szString[128]; format( szString, 128, \"Gate Info( Placed by: %s | Password: %d)\", GateInfo[gPlacedBy], GateInfo[gPassword] ); SendClientMessage( playerid, -1, szString ); return 1; } else return SendClientMessage( playerid, -1, \"You\'re not near any gate.\" ); } } } else return SendClientMessage( playerid, -1, \"You\'re not an admin.\" ); return 1;}public OnFilterScriptInit( ){ for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 0 ) { new file[64]; format( file, 64, \"Gates/gate_%d.ini\", i ); if( fexist( file ) ) { GateInfo[gCreated] = 1; GateInfo[gX] = dini_Float( file, \"X\" ); GateInfo[gY] = dini_Float( file, \"Y\" ); GateInfo[gZ] = dini_Float( file, \"Z\" ); GateInfo[gA] = dini_Float( file, \"A\" ); GateInfo[gStatus] = dini_Int( file, \"Status\" ); GateInfo[gPassword] = dini_Int( file, \"Password\" ); format( GateInfo[gPlacedBy], 24, dini_Get( file, \"PlacedBy\" ) ); GateInfo[gObject] = CreateObject( GATE_OBJECT, GateInfo[gX], GateInfo[gY], GateInfo[gZ], 0, 0, GateInfo[gA] ); } } } return 1;}public OnFilterScriptExit( ){ for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 1 ) { new file[64]; format( file, 64, \"Gates/gate_%d.ini\", i ); if( fexist( file ) ) { dini_IntSet( file, \"Object\", GateInfo[gObject] ); dini_FloatSet( file, \"X\", GateInfo[gX] ); dini_FloatSet( file, \"Y\", GateInfo[gY] ); dini_FloatSet( file, \"Z\", GateInfo[gZ] ); dini_FloatSet( file, \"A\", GateInfo[gA] ); dini_IntSet( file, \"Status\", GateInfo[gStatus] ); dini_IntSet( file, \"Password\", GateInfo[gPassword] ); dini_Set( file, \"PlacedBy\", GateInfo[gPlacedBy] ); DestroyObject( GateInfo[gObject] ); format( GateInfo[gPlacedBy], 24, \"None\" ); GateInfo[gCreated] = 0; GateInfo[gX] = 0.0; GateInfo[gY] = 0.0; GateInfo[gZ] = 0.0; GateInfo[gA] = 0.0; GateInfo[gStatus] = GATE_STATE_CLOSED; } } } return 1;}public OnObjectMoved( objectid ){ for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 1 ) { if( GateInfo[gObject] == objectid ) { if( GateInfo[gStatus] == GATE_STATE_CLOSED ) GateInfo[gStatus] = GATE_STATE_OPEN; else if( GateInfo[gStatus] == GATE_STATE_OPEN ) GateInfo[gStatus] = GATE_STATE_CLOSED; // Update the variables. new Float:oPos[3]; GetObjectPos( objectid, oPos[0], oPos[1], oPos[2] ); GateInfo[gX] = oPos[0]; GateInfo[gY] = oPos[1]; GateInfo[gZ] = oPos[2]; break; } } } return 1;}stock CreateGate( playerid, password, Float:x, Float:y, Float:z, Float:a ){ for( new i = 0; i != MAX_GATES; i++ ) { if( GateInfo[gCreated] == 0 ) { new szName[24]; GetPlayerName( playerid, szName, 24 ); GateInfo[gObject] = CreateObject( GATE_OBJECT, x, y, z+1.5, 0, 0, a ); format( GateInfo[gPlacedBy], 24, \"%s\", szName ); GateInfo[gCreated] = 1; GateInfo[gX] = x; GateInfo[gY] = y; GateInfo[gZ] = z+1.5; // comment the +1.5 if you\'re not using object 980. GateInfo[gA] = a; GateInfo[gStatus] = GATE_STATE_CLOSED; GateInfo[gPassword] = password; SetPlayerPos( playerid, x+1, y+1, z ); new file[64]; format( file, 64, \"Gates/gate_%d.ini\", i ); if( !fexist( file ) ) { dini_Create( file ); dini_IntSet( file, \"Object\", GateInfo[gObject] ); dini_FloatSet( file, \"X\", GateInfo[gX] ); dini_FloatSet( file, \"Y\", GateInfo[gY] ); dini_FloatSet( file, \"Z\", GateInfo[gZ] ); dini_FloatSet( file, \"A\", GateInfo[gA] ); dini_IntSet( file, \"Status\", GateInfo[gStatus] ); dini_Set( file, \"PlacedBy\", GateInfo[gPlacedBy] ); } break; } }}
akkor valaki? [/quote]params-okat kicseréled cmdtext-re public OnPlayerCommandText(playerid, cmdtext[]) alá beírod a parancsokatif (strcmp(\"/parancs\", cmdtext, true, 10) == 0) kicseréled a CMD:parancs(playerid,params[])-okat ... [/quote]Szerinted miért alkalmazták anno az strtok nevû kis kódot? Azért, hogy egy szóköz után nézze át a paramétereket a SA-MP.isnull(cmdtext) jelentése: ha üres a cmdtext, tehát semmit sem írt be.
akkor valaki? [/quote]params-okat kicseréled cmdtext-re public OnPlayerCommandText(playerid, cmdtext[]) alá beírod a parancsokatif (strcmp(\"/parancs\", cmdtext, true, 10) == 0) kicseréled a CMD:parancs(playerid,params[])-okat ... [/quote]Ez az év legnagyobb hülyesége. Szerinted miért alkalmazták anno az strtok nevû kis kódot? Azért, hogy egy szóköz után nézze át a paramétereket a SA-MP.isnull(cmdtext) jelentése: ha üres a cmdtext, tehát semmit sem írt be. Ennek aztán annyi értelme van mint árvaházban szülõi értekezletet tartani... [/quote]Elírtam... szerintem veled is elõfordul.. de még hogy a bunkóságot kevered egy 1000 éves \"poénnal\" nem gondoltam volna gmodi létedre... de mindennap tanul valamit az ember
Elnézést kérek, ha tapló voltam, csak én már láttam néhány tanácsodat, és te ennél sokkal több vagy! Igen, én is szoktam hibázni. Minden általam írt kód elsõre hibás, másodikra felfogom a hibát, harmadikra javítom.Stewart, továbbra is ajánlanám a zcmd megtartását. [/quote]Köszönöm, és elnézést legközelebb leellenõrizem amit írok