SA-MP Forums Archive
"[NAME] Does not care" command? - 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)
+--- Thread: "[NAME] Does not care" command? (/showthread.php?tid=407345)



"[NAME] Does not care" command? - NicholasA - 13.01.2013

hey i want to make a cmd /nocare which broadcasts: "[PLAYERNAME] does not give a damn."
How do i put his name at the playername spot?


Re: "[NAME] Does not care" command? - u3ber - 13.01.2013

Quote:
Originally Posted by phantomcraft
Посмотреть сообщение
hey i want to make a cmd /nocare which broadcasts: "[PLAYERNAME] does not give a damn."
How do i put his name at the playername spot?
can we see what you have attempted?


Re: "[NAME] Does not care" command? - NicholasA - 13.01.2013

Quote:
Originally Posted by arbit
Посмотреть сообщение
can we see what you have attempted?
Did not attempt anything cause of the fact im new at this territory


Re: "[NAME] Does not care" command? - [HK]Ryder[AN] - 13.01.2013

in zcmd and sscanf
pawn Код:
CMD:nocare(playerid, params[])
{
new targetid, pname[MAX_PLAYER_NAME], string[128];
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "usage : /nocare (playerid/part of name)");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Invalid Player");
GetPlayerName(targetid, pname, sizeof(pname));
format(string, sizeof(string), "[%s] Does not give a damn.", pname);
SendClientMessageToAll(-1, string);
return 1;
}



Re: "[NAME] Does not care" command? - [XST]O_x - 13.01.2013

pawn Код:
if(!strcmp(cmdtext,"/nocare"))
{
    new name[MAX_PLAYER_NAME],string[64];
    GetPlayerName(playeird,name,sizeof(name));
    format(string, sizeof(string), "%s does not give a damn.", name);
    SendClientMessageToAll(THECOLORYOUWANT, string);
    return 1;
}



Re: "[NAME] Does not care" command? - NicholasA - 13.01.2013

Quote:
Originally Posted by [HK]Ryder[AN]
Посмотреть сообщение
in zcmd and sscanf
pawn Код:
CMD:nocare(playerid, params[])
{
new targetid, pname[MAX_PLAYER_NAME], string[128];
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "usage : /nocare (playerid/part of name)");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Invalid Player");
GetPlayerName(targetid, pname, sizeof(pname));
format(string, sizeof(string), "[%s] Does not give a damn.", pname);
SendClientMessageToAll(-1, string);
return 1;
}
thx, rep