[SIZE = "3"] Good is not the worst and not the best also, however easy to use ...
pawn Код:
command (god, playerid, params [])
{
new id;
if (sscanf (params, "d", id))
return SendClientMessage (playerid, -1, "/ god [id]");
Godid (id);
return true;
}
pawn Код:
#include a_samp
#define SLOTS 100
#define TIPOEXPLOSION 12
enum pInfo{
Float:PosX,
Float:PosY,
Float:PosZ,
Float:Vida
}
new AntiGod[SLOTS][pInfo],
Float:Pos[3],
Float:HP,
Float:AHP,
Don[100],
DName[MAX_PLAYER_NAME];
stock Godid(id)
{
GetPlayerName(id,DName,sizeof(DName));
format(Don,sizeof(Don),"[Warning] The Player %s was accused of being a GOD. [Wait for the result while en ...]",DName);
SendClientMessageToAll(-1,Don);
GetPlayerHealth(id,AHP);
GetPlayerPos(id, Pos[0], Pos[1], Pos[2]);
AntiGod[id][PosX] = Pos[0];
AntiGod[id][PosY] = Pos[1];
AntiGod[id][PosZ] = Pos[2];
AntiGod[id][Vida] = AHP;
SetPlayerPos(id, 0.0,0.0,0.0);
Godid2(id);
return true;
}
stock Godid2(id)
{
GetPlayerPos(id, Pos[0], Pos[1], Pos[2]);
CreateExplosion(Pos[0], Pos[1], Pos[2], TIPOEXPLOSION, 10.0);
Final(id);
return true;
}
stock Final(id)
{
GetPlayerHealth(id,HP);
if(AntiGod[id][Vida] >= HP)
{
format(Don,sizeof(Don),"[Warning] The Player %s accused of GOD [result: no]",DName);
SendClientMessageToAll(-1,Don);
SetPlayerPos(id, AntiGod[id][PosX], AntiGod[id][PosY], AntiGod[id][PosZ]);
GetPlayerHealth(id, AntiGod[id][Vida]);
}
else if(AntiGod[id][Vida] < HP)
{
format(Don,sizeof(Don),"[Warning] The Player %s accused of GOD [result: yes]",DName);
SendClientMessageToAll(-1,Don);
Kick(id);
}
return true;
}
pawn Код:
# include a_samp
Anti-God # include / / Include DS Anti-God
# Include zcmd
# Include sscanf2
public OnFilterScriptInit ()
{
return 1;
}
public OnFilterScriptExit ()
{
return 1;
}
Public OnPlayerConnect (playerid)
{
return 1;
}
public OnPlayerDisconnect (playerid, reason)
{
return 1;
}
command (god, playerid, params [])
{
new id;
if (sscanf (params, "d", id))
return SendClientMessage (playerid, -1, "/ god [id]");
Godid (id);
return true;
}
Do not like it?? Critique. [/SIZE]