Little question. - 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: Little question. (
/showthread.php?tid=77315)
Little question. -
FreeSoul - 10.05.2009
I want a command like.
If the admin types /adminod a message will be sent to all players that are currently online in the server with
X is now on duty as an admin.
X will be the name of the admin that typed /adminod
The player's team color will be set to a specific color.
Then if the types /adminof a message will be sent to all players with X is no longer on duty as an admin.
X will be the name of the admin that types /adminof.
The player's team color will be set back to the color he had before he typed /adminod.
Well,I managed to do something but it didn't worked.The thing with the color I managed to do,but IDK how to make the message.I tried many different ways it just won't work and IDK why.
Thanks in advance.
Regards ~ FreeSoul
Re: Little question. -
Think - 10.05.2009
thats why we got a script request topic.
Re: Little question. -
FreeSoul - 10.05.2009
Sorry I will try there,but usualy nobody answers me.That's why I posted here.
Re: Little question. -
FreeSoul - 10.05.2009
Bump,sorry,can somebody help me? nobody answers the script req thread for me.
Have a nice day/night
Re: Little question. -
marszim - 10.05.2009
Код:
if(!strcmp(cmdtext, "/adminduty", true)) // By Ellis
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You need to login first !");
return 1;
}
if(PlayerInfo[playerid][pAdmin] > 0)
{
if(AdminDuty[playerid] == 0)
{
AdminDuty[playerid] = 1;
SetPlayerArmour(playerid, 999);
SetPlayerHealth(playerid, 999);
SetPlayerColor(playerid,TEAM_VAGOS_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "AdmWarning: [ID:%d]%s goes on duty as admin", playerid, sendername);
ABroadCast(COLOR_YELLOW,string,1);
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
for(new i = 0; i < sizeof(CarInfo); i++)
{
SetVehicleParamsForPlayer(i,playerid,0,0);
}
}
return 1;
}
else if(AdminDuty[playerid] == 1)
{
AdminDuty[playerid] = 0;
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "AdmWarning: [ID:%d]%s goes off duty as admin", playerid, sendername);
ABroadCast(COLOR_YELLOW,string,1);
SetPlayerToTeamColor(playerid);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You're not the admin !");
return 1;
}
}
return 1;
}
Uses [pAdmin], although you can change..
enjoy
Re: Little question. -
FreeSoul - 10.05.2009
Done.
But if I do /aod and then /aod again it doesn't send the message with Is now off duty.
Why?