Can help ? -
ignas1125 - 04.03.2013
Hi everyone sorry for bad english.
Can you help me ? i need make command that all id's make a human just one id make zombie
like /setzm [ID]
other will be human
i'm using apocalypse mode here is scripts that make human and zombie
Код:
ZombieSetup(targetid);
SpawnPlayer(targetid);
and human
Quote:
HumanSetup(targetid);
SpawnPlayer(targetid);
|
Then i need command that makes player health like 1000 and its rlly hard to kill him.
Thanks for help,who gonna help me
Re: Can help ? -
DiGiTaL_AnGeL - 04.03.2013
You'll need YCMD and sscanf. Use the
search function to find them. Here is the command:
pawn Код:
YCMD:setzm(playerid, params[], help)
{
#pragma unused params
if(IsPlayerAdmin(playerid))//this will work only for rcon admins, change it to your admin variable
{
new recid;
if(sscanf(params, "u", recid)) return SCM(playerid, 0xFF0000FF, "USAGE : /setzm [player id/name]");
else
{
ZombieSetup(recid);
SpawnPlayer(recid);
SCM(playerid, 0xFF0000FF, "You're a zombie!");//change the message
SetPlayerHealth(recid, 1000);//so it's going to be hard to kill him
}
}
return 1;
}
Re: Can help ? -
ignas1125 - 04.03.2013
Quote:
Originally Posted by DiGiTaL_AnGeL
You'll need YCMD and sscanf. Use the search function to find them. Here is the command:
pawn Код:
YCMD:setzm(playerid, params[], help) { #pragma unused params if(IsPlayerAdmin(playerid))//this will work only for rcon admins, change it to your admin variable { new recid; if(sscanf(params, "u", recid)) return SCM(playerid, 0xFF0000FF, "USAGE : /setzm [player id/name]"); else { ZombieSetup(recid); SpawnPlayer(recid); SCM(playerid, 0xFF0000FF, "You're a zombie!");//change the message SetPlayerHealth(recid, 1000);//so it's going to be hard to kill him } } return 1; }
|
This is that i chose one id that will be zombie other will be humans ?
Like:
i chose 2 ID
and 0,1,3,4,5,6,7,8,9,10 will be humans ?
Re: Can help ? -
DiGiTaL_AnGeL - 04.03.2013
No, only the id you'll select will be a zombie. I hadn't read well.
Re: Can help ? -
ignas1125 - 04.03.2013
Huh,i hawe that command for zombie set i need the another id's to be humans.In my server are auto selector so i need whit 1command make all
Re: Can help ? -
Azazelo - 04.03.2013
pawn Код:
CMD:setzm(playerid, params[], help) //Credit to DiGiTaL_AnGeL
{
#pragma unused params
if(IsPlayerAdmin(playerid))//this will work only for rcon admins, change it to your admin variable
{
new recid;
if(sscanf(params, "u", recid)) return SCM(playerid, 0xFF0000FF, "USAGE : /setzm [player id/name]");
else
{
ZombieSetup(recid);
SpawnPlayer(recid);
SCM(recid, 0xFF0000FF, "You're a zombie!");//change the message
SetPlayerHealth(recid, 1000);//so it's going to be hard to kill him
foreach(new i : Player)
{
if(IsPlayerConnected(i))
{
if(recid != i)
{
HumanSetup(i);
SpawnPlayer(i);
SCM(i, 0xFF0000FF, "You're a human!");//change the message
SetPlayerHealth(i, 100);
}
}
}
}
}
return 1;
}
Re: Can help ? -
fordawinzz - 04.03.2013
remove #pragma unused params because you actually use the params , lol (sscanf).
also, the IsPlayerConnected check in foreach isn't necessary as it checks automaticlly.
pawn Код:
command(setzm, playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new recid;
if(sscanf(params, "u", recid)) return SCM(playerid, -1, "USAGE : /setzm [player id/name]");
if(recid == INVALID_PLAYER_ID) return SCM(playerid, -1, "Invalid user id.")
ZombieSetup(recid);
SpawnPlayer(recid);
SCM(recid, -1, "You're a zombie!");
SetPlayerHealth(recid, 1000);
foreach(new i : Player)
{
if(recid != i)
{
HumanSetup(i);
SpawnPlayer(i);
SCM(i, -1, "You're a human!");
SetPlayerHealth(i, 100);
}
}
}
return 1;
}
You'll need sscanf, foreach and zcmd for that.
Re: Can help ? -
ignas1125 - 04.03.2013
Thx guys
maybe u can tell how make textdraw where can see health :P