Request :)
#1

I have this CMD
Quote:

if(strcmp(cmd, "/pk", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /pk [id/name] [PKer]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 3)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /pk [id/name] [PKer]");
return 1;
}
format(string, sizeof(string), "[AdminCMD] : %s Was AdminPKed by Admin %s - PKer: %s", giveplayer, sendername, (result));
SendClientMessageToAll(0x5EFB6EFF, string);
format(string, sizeof(string), "You were AdminPKed by Admin %s, you are kicked out of your faction.",sendername);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
}
}
else
{
format(string, sizeof(string), " %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}

Nobody answers the GF or the Scripting request thread.
Thanks in advance
Regards-FreeSoul
Reply


Messages In This Thread
Request :) - by FreeSoul - 07.05.2009, 18:12
Re: Request :) - by [HiC]TheKiller - 07.05.2009, 20:07
Re: Request :) - by FreeSoul - 07.05.2009, 20:34
Re: Request :) - by ferriswheel - 07.05.2009, 21:24
Re: Request :) - by FreeSoul - 08.05.2009, 04:58
Re: Request :) - by [HiC]TheKiller - 08.05.2009, 05:11
Re: Request :) - by CJ101 - 08.05.2009, 05:11
Re: Request :) - by FreeSoul - 08.05.2009, 05:58
Re: Request :) - by Luka P. - 08.05.2009, 12:50
Re: Request :) - by FreeSoul - 08.05.2009, 17:28

Forum Jump:


Users browsing this thread: 2 Guest(s)