CMD:pm(playerid, params[]){if(GetPlayerSkin(playerid) == 181) return SendClientMessage(playerid, COLOR_ULTRARED, \"Ezt nem használhatod mert rab vagy!\");if(GetPlayerSkin(playerid) == 285) return SendClientMessage(playerid, COLOR_ULTRARED, \"Ezt nem használhatod mert Õr vagy!\");new PID, reason[256], pName[MAX_PLAYER_NAME], Sender[MAX_PLAYER_NAME];if(sscanf(params, \"uz[256]\", PID, reason)) return SendClientMessage(playerid, 0xFF0000FF, \"Használat: /pm [iD] [Üzenet]\");if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, 0xFF0000FF, \"Hibás ID!\");else{new Str[128];GetPlayerName(PID, pName, sizeof(pName));GetPlayerName(playerid, Sender, sizeof(Sender));format(Str, sizeof(Str), \"[bejövõ PM]: %s [%d]: %s\", Sender, playerid, reason);SendClientMessage(PID, COLOR_YELLOW, Str);format(Str, sizeof(Str), \"[PM elküldve]: %s [%d]: %s\", pName, PID, reason);SendClientMessage(playerid, COLOR_LIGHTBLUE, Str);}return 1;}
SendPlayerMessageToPlayer(PID, playerid, Str);
[17:56:50] sscanf warning: \'z\' is deprecated, consider using \'S\' instead.[17:56:50] sscanf warning: No default value found.
MD:pm(playerid, params[]){if(GetPlayerSkin(playerid) == 181) return SendClientMessage(playerid, COLOR_ULTRARED, \"Ezt nem használhatod mert rab vagy!\");if(GetPlayerSkin(playerid) == 285) return SendClientMessage(playerid, COLOR_ULTRARED, \"Ezt nem használhatod mert Õr vagy!\");new PID, reason[256], pName[MAX_PLAYER_NAME], Sender[MAX_PLAYER_NAME];if(sscanf(params, \"us[256]\", PID, reason)) return SendClientMessage(playerid, 0xFF0000FF, \"Használat: /pm [iD] [Üzenet]\");if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, 0xFF0000FF, \"Hibás ID!\");else{new Str[256];GetPlayerName(PID, pName, sizeof(pName));GetPlayerName(playerid, Sender, sizeof(Sender));format(Str, sizeof(Str), \"|- Bejövõ PM Tõle: %s [%d] -|: %s\", Sender, PID, reason);SendClientMessage(PID, COLOR_YELLOW, Str);format(Str, sizeof(Str), \"|- PM elküldve neki: %s [%d] -|: %s\", pName, playerid, reason);SendClientMessage(playerid, COLOR_LIGHTBLUE, Str);}return 1;}
MD:pm(playerid, params[]){if(GetPlayerSkin(playerid) == 181) return SendClientMessage(playerid, COLOR_ULTRARED, \"Ezt nem használhatod mert rab vagy!\");if(GetPlayerSkin(playerid) == 285) return SendClientMessage(playerid, COLOR_ULTRARED, \"Ezt nem használhatod mert Õr vagy!\");new PID, reason[256], pName[MAX_PLAYER_NAME], Sender[MAX_PLAYER_NAME];if(sscanf(params, \"us[256]\", PID, reason)) return SendClientMessage(playerid, 0xFF0000FF, \"Használat: /pm [iD] [Üzenet]\");if(PID == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000FF, \"Hibás ID!\");new Str[256];GetPlayerName(PID, pName, sizeof(pName));GetPlayerName(playerid, Sender, sizeof(Sender));format(Str, sizeof(Str), \"|- Bejövõ PM Tõle: %s [%d] -|: %s\", Sender, PID, reason);SendClientMessage(PID, COLOR_YELLOW, Str);format(Str, sizeof(Str), \"|- PM elküldve neki: %s [%d] -|: %s\", pName, playerid, reason);SendClientMessage(playerid, COLOR_LIGHTBLUE, Str);return 1;}
printf(\"%i\",PID);
Nálam ezt a problémát megoldotta egy sscanf frissítés.
Melyik verzión fut a szerver?