/r command not working - 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: /r command not working (
/showthread.php?tid=129646)
/r command not working -
bristan - 23.02.2010
this is part of the command im working on every other faction can use it but ems and fire heres the code
Код:
if(gteam[playerid] == Team_EMS || gteam[playerid] == Team_Fire){
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "(DPSCOM) EMS-%d: %s, over", playerid, cmdtext[3]);
SendMessageToEMS(string);
and the SendMessageToEMS part
Код:
SendMessageToEMS(const str[])
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i)) {
if (gteam[i]==Team_Fire || gteam[i]==Team_EMS) {
SendClientMessage(i, COLOR_RED, str);
}
}
}
}
if i use /r as ems like /r this is a test nothing shows as if it ant working and it only seems to be ems and fire
Re: /r command not working -
Flake. - 23.02.2010
try this
Код:
dcmd_r(playerid, params[])
{
new text[256], name[60];
if(sscanf(params, "s", text)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /r [text]");
else
{
new string[322];
GetPlayerName(playerid, name, 60);
format(string, 322, "(%s) (Radio): %s", name, text);
for(new i=0;i<MAX_PLAYER;i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[i] == gTeam[playerid])
{
SendClientMessage(i, COLOR_GREEN, string);
}
}
}
}
return 1;
}
Re: /r command not working -
[LSR]State_Trooper - 23.02.2010
Bristan, Are you Using the ERP Script By Lt. Cain ( Un Released bout 10 ppl have it ) ?? If you are PM me and Ill b able to fix this for you