[NL] /Explode ID ?? :o - 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: [NL] /Explode ID ?? :o (
/showthread.php?tid=78287)
[NL] /Explode ID ?? :o -
Jokerr_mayne - 18.05.2009
I want a cmd for a admin to explode another player.
/explode ID
Re: [NL] /Explode ID ?? :o -
MPKaboose - 18.05.2009
there are some admin FS-es that have this command in it just search for one and copy it out
Re: [NL] /Explode ID ?? :o -
Xeretta - 18.05.2009
in public OnPlayerCommandText :
Код:
if(strcmp(cmd, "/explode", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR, "Use: /explode [id/nick]");
return 1;
}
new playa;
new Float:x,Float:y,Float:z;
playa = CheckUser(tmp);
if(IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerPos(playa, x, y, z);
format(cmdstring,sizeof(cmdstring),"You explode %s.", PlayerName(playa));
format(cmdstring2,sizeof(cmdstring2),"The ADM %s explode you.",PlayerName(playerid));
SendClientMessage(playerid,COLOR,cmdstring);
SendClientMessage(playa,COLOR,cmdstring2);
CreateExplosion(x, y, z, 10, 30);
CreateExplosion(x + 1, y, z, 10, 30);
CreateExplosion(x + 1, y + 1, z, 10, 30);
CreateExplosion(x, y + 1, z, 10, 30);
CreateExplosion(x - 1, y, z, 10, 30);
CreateExplosion(x, y - 1, z, 10, 30);
CreateExplosion(x - 1, y - 1, z, 10, 30);
return 1;
}
else
{
SendClientMessage(playerid, COLOR, "The player is off!");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR, "You don't are administrator!");
return 1;
}
}
SendClientMessage(playerid, COLOR, "The Player is off!");
return 1;
}
End of the script:
Код:
CheckUser(text[], playerid = INVALID_PLAYER_ID)
{
new pos = 0;
while (text[pos] < 0x21)
{
if (text[pos] == 0) return INVALID_PLAYER_ID;
pos++;
}
new userid = INVALID_PLAYER_ID;
if (IsNumeric(text[pos]))
{
userid = strval(text[pos]);
if (userid >=0 && userid < MAX_PLAYERS)
{
if(!IsPlayerConnected(userid))
{
userid = INVALID_PLAYER_ID;
}
else
{
return userid;
}
}
}
^^
Re: [NL] /Explode ID ?? :o -
superbryanb - 13.06.2009
C:\Users\Bryan\Desktop\Server\Server LS\gamemodes\penls.pwn(16969) : error 017: undefined symbol "CheckUser"
C:\Users\Bryan\Desktop\Server\Server LS\gamemodes\penls.pwn(16977) : error 017: undefined symbol "cmdstring"
C:\Users\Bryan\Desktop\Server\Server LS\gamemodes\penls.pwn(16977) : error 017: undefined symbol "cmdstring"
C:\Users\Bryan\Desktop\Server\Server LS\gamemodes\penls.pwn(16977) : error 029: invalid expression, assumed zero
C:\Users\Bryan\Desktop\Server\Server LS\gamemodes\penls.pwn(16977) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.