script [HELP] - 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: script [HELP] (
/showthread.php?tid=94861)
script [HELP] -
sggassasin - 01.09.2009
hey i need some help i have a heal command that heals me but i whant one so i can heal other players so could someone help me plz thx for ur time
Re: script [HELP] -
sggassasin - 01.09.2009
i only need for one person so like... /heal <playerid>
Re: script [HELP] -
sggassasin - 02.09.2009
help *bump*
Re: script [HELP] - Zeex - 02.09.2009
look at any other gamemode/adminscript
------------------------
Quote:
Originally Posted by ► James_Alex
try this
pawn Код:
if(strcmp(cmdtext, "/healall", true) == 0) { for(new i = 0; i < MAX_PLAYERS; i ++) { SetPlayerHealth(i, 100); SendClientMessageToAll(0x33AA33AA, "All the players has been healed"); } return 1; }
|
It will send 200 messages to each player
Re: script [HELP] -
The_Tough - 02.09.2009
Quote:
Originally Posted by ► James_Alex
try this
pawn Код:
if(strcmp(cmdtext, "/healall", true) == 0) { for(new i = 0; i < MAX_PLAYERS; i ++) { SetPlayerHealth(i, 100); SendClientMessageToAll(0x33AA33AA, "All the players has been healed"); } return 1; }
maybe if
Код:
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerHealth(i,100.0);
SendClientMessageToAll(0xFFFFFFFF,"All players are healed !");
|
I use dcmd and created this type of /heal
Код:
dcmd_aheal(playerid,params[]) {
if(PlayerData[playerid][Level] >= 1)
{
new id = (IsNumeric(params)) ? strval(params) : GetPlayerId(params);
new playername[MAX_PLAYER_NAME],adminname[MAX_PLAYER_NAME],string[100];
if(!strlen(params)) return ACM(playerid,"[ ! ] Correct usage : /aheal <playerid>");
if(!IsPlayerConnected(id)) return ACM(playerid,"[ ! ] Incorrect playerid !");
if(id == playerid) return LRS(playerid,"[ ! ] You have admin healed your self !"); SetPlayerHealth(playerid,100.0);
GetPlayerName(playerid,adminname,sizeof(adminname));
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),"[ ! ] You have admin healed %s(ID:%d)",playername,id);
LRS(playerid,string);
format(string,sizeof(string),"[ NOTICE ] You have been admin healed by admin %s(ID:%d),",adminname,playerid);
SendClientMessage(playerid,COLOUR_YELLOW,string);
SetPlayerHealth(id,100.0);
}
return 1;
}