https://sampforum.hu/index.php?page=scripts&to=&by=&sn=prefix
public OnPlayerText(playerid, text[]){ new format[128], nev[MAX_PLAYER_NAME], admin[32]; GetPlayerName(playerid, nev, sizeof (nev)); switch(ADMINVÁLTOZÓD) //ÍRD ÁT MAJD! { case 0: admin = \"Játékos\"; case 1: admin = \"VIP\"; case 2: admin = \"Moderátor\"; case 3: admin = \"Admin\"; case 4: admin = \"Fõadmin\"; case 5: admin = \"Scripter\"; case 6: admin = \"Tulaj\"; } format(format, sizeof (format), \"(%d)%s[%s]: %s\", playerid, nev, admin, text); SendPlayerMessageToAll(playerid, format); return 0;}
Erroros? Végülis csak full nagybetűvel van odaírva, hogy írd át a változót.....
Oda azt a változót kell írnod, amiben tárolod az adott player adminszintjét. :wall:Nem csak be kell írni valamit oda. :facepalm:
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(10806) : warning 217: loose indentationC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20207) : warning 219: local variable \"format\" shadows a variable at a preceding levelC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20210) : warning 217: loose indentationC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 217: loose indentationC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : error 012: invalid function call, not a valid addressC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effectC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effectC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effectC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effectC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effectC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effectC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effectC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : error 001: expected token: \";\", but found \")\"C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : error 029: invalid expression, assumed zeroC:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 4 Errors.
public OnPlayerText(playerid, text[]){ new format[128], nev[MAX_PLAYER_NAME], admin[32]; GetPlayerName(playerid, nev, sizeof (nev)); switch(PlayerLevel) //ÍRD ÁT MAJD! { case 0: admin = \"Játékos\"; case 1: admin = \"Moderátor\"; case 2: admin = \"Admin-segég\"; case 3: admin = \"Admin\"; case 4: admin = \"Főadmin\"; case 5: admin = \"Tulajdonos\"; } format(format, sizeof (format), \"(%d)%s[%s]: %s\", playerid, nev, admin, text); SendPlayerMessageToAll(playerid, format);// Block the player\'s text if he has been muted if (APlayerData[playerid][Muted] == true){// Let the player know he\'s still mutedSendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Némítva vagy\");// Don\'t allow his text to be sent to the chatbox return 0;} return 1;}
new szoveg[128], nev[MAX_PLAYER_NAME], admin[32]; GetPlayerName(playerid, nev, sizeof (nev)); switch(PlayerLevel) //ÍRD ÁT MAJD! { case 0: admin = \"Játékos\"; case 1: admin = \"Moderátor\"; case 2: admin = \"Admin-segég\"; case 3: admin = \"Admin\"; case 4: admin = \"Főadmin\"; case 5: admin = \"Tulajdonos\"; } format(szoveg, sizeof (szoveg), \"(%d)%s[%s]: %s\", playerid, nev, admin, text); SendPlayerMessageToAll(playerid, szoveg); // Block the player\'s text if he has been muted if (APlayerData[playerid][Muted] == true) { // Let the player know he\'s still muted SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Némítva vagy\"); // Don\'t allow his text to be sent to the chatbox return 0; } return 1;}
Akkor töröld ki a név lekérőt!Másik meg felesleges beírni külön a rangokat mikor már be van 1x írva a PPC_Defines be csak le kell kérdezni őket oszt csá