//PM rendszer 0.3e By:[sDW]BlackJack!// * * |\\ /|// | * | \\ / |// |* * | \\ / |// | | \\/ |// | | |// | | |// | | |// | | |#include <a_samp>#include <sscanf2>#include <zcmd>#include <colors>public OnFilterScriptInit(){ print(\"\\n--------------------------------------\"); print(\"PM rendszer 0.3e By:[sDW]BlackJack!\"); print(\"--------------------------------------\\n\"); return 1;}stock GetNev(playerid){new NEV[MAX_PLAYER_NAME];GetPlayerName(playerid,NEV,50);return NEV;}CMD:pm(playerid, params[]){new pID;new uzenet[200];new player1;if(sscanf(params, \"us\", pID,uzenet)) SendClientMessage(playerid, COLOR_YELLOW, \"[Használat]: /pm [playerid] [uzenet]\");else {format(uzenet, 200, \"(PM):*%s küldöt neked egy üzenetet:%s\", GetNev(playerid), uzenet);SendClientMessage(pID, COLOR_GREEN, uzenet);}if(!IsPlayerConnected(player1) || IsPlayerNPC(player1)) return SendClientMessage(playerid, COLOR_RED, \"Érvénytelen azonosító!\");if(playerid == player1) return SendClientMessage(playerid, COLOR_RED, \"Magadnak nem küldhetsz privát üzeneted!\");return 1;}// * * |\\ /|// | * | \\ / |// |* * | \\ / |// | | \\/ |// | | |// | | |// | | |// | | |
CMD:pm(playerid, params[]){ new player1, pm[120]; if(sscanf(params, \"us[120]\", player1, pm)) return SendClientMessage(playerid, COLOR_RED, \"HASZNÁLAT: /pm [Játékos ID/Név] [Üzenet]\"); if(!IsPlayerConnected(player1) || IsPlayerNPC(player1)) return SendClientMessage(playerid, COLOR_RED, \"Érvénytelen azonosító!\");if(playerid == player1) return SendClientMessage(playerid, COLOR_RED, \"Magadnak nem küldhetsz privát üzeneted!\"); OnPlayerPrivmsg(playerid, player1, pm); return 1;}forward OnPlayerPrivmsg(playerid, recieverid, text[]);public OnPlayerPrivmsg(playerid, recieverid, text[]){new str[128+1];format(str,sizeof(str),\"[ PM ]: %s-tõl(ID:%i): %s\", pName(playerid), playerid, text);SendClientMessage(recieverid,-1,str);format(str,sizeof(str),\"[ PM ]: %s-nek(ID:%i): %s\", pName(recieverid), recieverid, text);SendClientMessage(playerid,-1,str);return 1;}stock pName(playerid){new name[MAX_PLAYER_NAME];GetPlayerName(playerid, name, sizeof(name));return name;}
Sajnos nekem ezt írja:E:\\San Andreas Server\\filterscripts\\PM.pwn(12) : warning 235: public function lacks forward declaration (symbol \"OnPlayerPrivmsg\")E:\\San Andreas Server\\filterscripts\\PM.pwn(15) : error 017: undefined symbol \"format\"E:\\San Andreas Server\\filterscripts\\PM.pwn(15) : warning 202: number of arguments does not match definitionE:\\San Andreas Server\\filterscripts\\PM.pwn(15) : warning 202: number of arguments does not match definitionE:\\San Andreas Server\\filterscripts\\PM.pwn(15) : warning 202: number of arguments does not match definitionE:\\San Andreas Server\\filterscripts\\PM.pwn(15) : warning 202: number of arguments does not match definitionE:\\San Andreas Server\\filterscripts\\PM.pwn(15) : warning 202: number of arguments does not match definitionE:\\San Andreas Server\\filterscripts\\PM.pwn(16) : error 017: undefined symbol \"SendClientMessage\"E:\\San Andreas Server\\filterscripts\\PM.pwn(18) : error 017: undefined symbol \"format\"E:\\San Andreas Server\\filterscripts\\PM.pwn(18) : warning 202: number of arguments does not match definitionE:\\San Andreas Server\\filterscripts\\PM.pwn(18) : warning 202: number of arguments does not match definitionE:\\San Andreas Server\\filterscripts\\PM.pwn(18) : warning 202: number of arguments does not match definitionE:\\San Andreas Server\\filterscripts\\PM.pwn(18) : warning 202: number of arguments does not match definitionE:\\San Andreas Server\\filterscripts\\PM.pwn(18) : warning 202: number of arguments does not match definitionE:\\San Andreas Server\\filterscripts\\PM.pwn(19) : error 017: undefined symbol \"SendClientMessage\"E:\\San Andreas Server\\filterscripts\\PM.pwn(25) : error 017: undefined symbol \"MAX_PLAYER_NAME\"E:\\San Andreas Server\\filterscripts\\PM.pwn(25) : error 009: invalid array size (negative, zero or out of bounds)E:\\San Andreas Server\\filterscripts\\PM.pwn(25) : error 036: empty statementE:\\San Andreas Server\\filterscripts\\PM.pwn(25) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase8 Errors.
Amúgy miért 0.3e? Ugyan úgy megy a többi verzión is Amúgy jó lett grat.