SA-MP Forums Archive
PM command in dcmd+sscanf - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: PM command in dcmd+sscanf (/showthread.php?tid=271317)



PM command in dcmd+sscanf - seanny - 23.07.2011

Hello, I need a PM command in dcmd please aswell as sscanf

Thanks


Re: PM command in dcmd+sscanf - PrawkC - 23.07.2011

pawn Код:
dcmd_pm(playerid, params[])
{
    new target, msg[128], tmp[128], name[MAX_PLAYER_NAME];
    if(sscanf(params, "us[128]", target, msg)) return SendClientMessage(playerid, -1, "Syntax: /pm id msg");
    if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1, "That player is offline!");
    GetPlayerName(playerid, name, sizeof(name)); //Might be sizeof(name) before the "name" cant look at wiki atm
    format(tmp, sizeof(tmp), "[PM] %s says: %s", name, msg);
    SendClientMessage(target, -1, tmp);
    return 1;
}
Untested but should work


Re: PM command in dcmd+sscanf - TheArcher - 23.07.2011

Yes, should work. But i suggest you to use ZCMD or YCMD most used and much faster. At the moment YCMD is faster than all.


Re: PM command in dcmd+sscanf - Steven82 - 23.07.2011

Quote:
Originally Posted by Anthony_prince
Посмотреть сообщение
Yes, should work. But i suggest you to use ZCMD or YCMD most used and much faster. At the moment YCMD is faster than all.
But what if his gamemode is already in DCMD? Why not just keep using DCMD and SSCANF?


Re: PM command in dcmd+sscanf - Mean - 23.07.2011

Quote:
Originally Posted by Steven82
Посмотреть сообщение
But what if his gamemode is already in DCMD? Why not just keep using DCMD and SSCANF?
Because it's really easy to switch to ZCMD.


Re: PM command in dcmd+sscanf - TheArcher - 24.07.2011

Quote:
Originally Posted by Steven82
Посмотреть сообщение
But what if his gamemode is already in DCMD? Why not just keep using DCMD and SSCANF?
And if someone want to buid a nice GM even editied is better to have more speed and less lag. What do you think?

Quote:
Originally Posted by Mean
Посмотреть сообщение
Because it's really easy to switch to ZCMD.
Agree.