if(strcmp(cmd, "/nuke", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /nuke [playerid/PartOfName]");
return 1;
}
new play;
new Float:slx, Float:sly, Float:slz;
play = ReturnUser(tmp);
if (IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(play))
{
if(play != INVALID_PLAYER_ID)
{
GetPlayerPos(play, slx, sly, slz);
CreateExplosion(slx, sly, slz-10.0, 6, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
SendClientMessage(play, 0x800080AA, "You have died from a mysterious
explosion");
SendClientMessageToAll(0x800080AA, "Somebody has died from a mysterious Explosion");
}
}
}
else
{
SendClientMessage(playerid, 0x800080AA, " You are not a bloody Admin !");
}
}
return 1;
}
new str[128];
new Nam[MAX_PLAYER_NAME];
if(strcmp(cmd, "/nuke", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /nuke [playerid/PartOfName]");
return 1;
}
new play;
new Float:slx, Float:sly, Float:slz;
play = ReturnUser(tmp);
if (IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(play))
{
if(play != INVALID_PLAYER_ID)
{
GetPlayerPos(play, slx, sly, slz);
CreateExplosion(slx, sly, slz-10.0, 6, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
SendClientMessage(play, 0x800080AA, "You have died from a mysterious
explosion");
SendClientMessageToAll(0x800080AA, "%s has died from a mysterious
Explosion",Nam);
}
}
}
else
{
SendClientMessage(playerid, 0x800080AA, " You are not a bloody Admin !");
}
}
return 1;
}
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
new str[128];
new Nam[MAX_PLAYER_NAME];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/nuke", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /nuke [playerid/PartOfName]");
return 1;
}
new play;
new Float:slx, Float:sly, Float:slz;
play = ReturnUser(tmp);
if (IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(play))
{
if(play != INVALID_PLAYER_ID)
{
GetPlayerPos(play, slx, sly, slz);
CreateExplosion(slx, sly, slz-10.0, 6, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
SendClientMessage(play, 0x800080AA, "You have died from a mysteriousexplosion");
SendClientMessageToAll(0x800080AA, "%s has died from a mysterious
Explosion",Nam);
}
}
}
else
{
SendClientMessage(playerid, 0x800080AA, " You are not a bloody Admin !");
}
}
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128];
new tmp[128];
if(strcmp(cmd, "/nuke", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /nuke [playerid/PartOfName]");
return 1;
}
new play;
new Float:slx, Float:sly, Float:slz;
play = ReturnUser(tmp);
if (IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(play))
{
if(play != INVALID_PLAYER_ID)
{
GetPlayerPos(play, slx, sly, slz);
CreateExplosion(slx, sly, slz-10.0, 6, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
SendClientMessage(play, 0x800080AA, "You have died from a mysterious explosion");
SendClientMessageToAll(0x800080AA, "Somebody has died from a mysterious Explosion");
}
}
}
else
{
SendClientMessage(playerid, 0x800080AA, " You are not a bloody Admin !");
}
}
return 1;
}
return 0;
}
PHP Code:
|
play = ReturnUser(tmp);
stock ReturnPlayerID(PlayerName[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new name[24];
GetPlayerName(playerid, name, 24);
if(strfind(pName(i),PlayerName,true)!=-1)
{
return i;
}
}
}
return INVALID_PLAYER_ID;
}
play = ReturnPlayerID(tmp);
main()
stock ReturnPlayerID(PlayerName[])
if(strfind(pName(i),PlayerName,true)!=-1)
stock ReturnPlayerID(PlayerName[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new name[24];
GetPlayerName(i, name, 24);
if(strfind(name(i),PlayerName,true)!=-1)
{
return i;
}
}
}
return INVALID_PLAYER_ID;
}