Szia!
Tessék itt vannak a cuccok, amiket kértél!
#include a_samp
#include sscanf
#include zcmd
CMD:pm(playerid, params[])
{
new giveplayerid, mess[200];
if (sscanf(params, \"us\", giveplayerid, mess)) SendClientMessage(playerid, 0xFF0000AA, \"Használat: /pm [playerid] [üzenet]\");
else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, \"Hiba: Nincs ilyen játékos!\");
else{
new name[MAX_PLAYER_NAME],string[200];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof string, \"PM Érkezett %s -tól/tõl:%s\", name, mess);
SendClientMessage(giveplayerid, 0xFF0000AA,string);
format(string, sizeof string, \"Üzeneted elküldve: %s\",mess);
SendClientMessage(playerid, 0xFF0000AA, string); }
return 1;
}
CMD:spec(playerid, params[])
{
new giveplayerid, name[MAX_PLAYER_NAME], string[100];
if(sscanf(params, \"u\", giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /spec [playerid]\");
if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, \"Hiba: Nincs ilyen játékos!\");
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, giveplayerid);
GetPlayerName(giveplayerid, name, sizeof(name));
format(string, sizeof string, \"Mostantól figyeled: %s -t\",name);
return 1;
}
CMD:specof(playerid, params[])
{
SendClientMessage(playerid, 0xFF0000AA, \"Abbahagytad a figyelést!\");
TogglePlayerSpectating(playerid, 0);
return 1;
}