20.02.2011, 13:45
Try it now
Dont just copy and paste it, check if its fits to your thing what you want that this script do, I just made it so script works
pawn Код:
if(dialogid == 7)
{
if(!response) { SendClientMessage(playerid,0xff0000ff, "You closed the Admin cmds Dialog"); return 1; }
new playerid2,PlayerName[24],on[24],string[128];
switch(listitem)
{
playerid2 = strval(intputtext);
if(!IsPlayerConnected(playerid2))
{
SendClientMessage(playerid,0xff0000ff,"Player is not connected!"); return 1;
}
GetPlayerName(playerid2,on,sizeof(on));
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
case 0:
{
SendClientMessage(playerid, 0xff0000ff, "This CMD is not completed yet");
}
case 1:
{
format(string,sizeof(string),"Admin %s has kicked %s",PlayerName,on);
SendClientMessageToAll(0xff0000ff,string);
Kick(playerid2);
}
case 2:
{
format(string,sizeof(string),"Admin %s has Banned %s",PlayerName,on);
SendClientMessageToAll(0xff0000ff,string);
Ban(playerid2);
}
case 3:
{
format(string, sizeof(string), "You Killed %s Succefully",on);
SendClientMessage(playerid, 0xff0000ff, string);
SetPlayerHealth(otherplayer, 0);
SendClientMessage(otherplayer, 0x00FF00FF, "An Admin Has Killed You");
}
case 4:
{
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerPos(playerid2,X,Y,Z);
if(IsPlayerInAnyVehicle(playerid2))
{
SetVehiclePos(GetPlayerVehicleID(playerid),X+2,Y+1,Z);
format(string, sizeof(string), "You have teleported to %s",on);
SendClientMessage(playerid,COLOR_WHITE, string);
}
else
{
SetPlayerPos(playerid, X+1, Y+1, Z);
}
}
}
return 1;
}