I need help... with Commands - 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: I need help... with Commands (
/showthread.php?tid=467040)
I need help... with Commands -
CountryTrooper441 - 30.09.2013
How do i Change one of these Commands
Код:
if(strcmp(cmd, "/finishreport", true) == 0 || strcmp(cmd, "/frp", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /(f)inish®e(p)ort[PlayerID/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(AcceptedReport[playerid] != giveplayerid)
{
return SendClientMessage(playerid, -1," You haven't accepted this player's report !");
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "AdmCmd: %s has Finished %s's report", sendername, giveplayer);
ABroadCast(COLOR_RED, string, 1);
format(string, sizeof(string), "%s has Finished your report, you can now continue your gameplay.", sendername);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
AcceptedReport[playerid] = -1;
Talkingto[playerid] = -1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use that command !");
return 1;
}
}
return 1;
}
Into like a CMD

Command) type of Command?
Re: I need help... with Commands -
Isolated - 30.09.2013
pawn Код:
CMD:command(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if(isnull(params))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /(f)inish®e(p)ort[PlayerID/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(params);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(AcceptedReport[playerid] != giveplayerid)
{
return SendClientMessage(playerid, -1," You haven't accepted this player's report !");
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "AdmCmd: %s has Finished %s's report", sendername, giveplayer);
ABroadCast(COLOR_RED, string, 1);
format(string, sizeof(string), "%s has Finished your report, you can now continue your gameplay.", sendername);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
AcceptedReport[playerid] = -1;
Talkingto[playerid] = -1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use that command !");
return 1;
}
return 1;
}
There is a lot of different tutorials on this subject. Search before posting.
Re: I need help... with Commands -
CountryTrooper441 - 30.09.2013
Oh.. Thank you! And Sorry
Re: I need help... with Commands -
Mattakil - 30.09.2013
You have to install ZCMD. If you change one command to ZCMD, you have to do it to all, or else it will bug. Also, install sscanf2, and read up on some tutorials