01.01.2013, 16:24
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/advcmds", true) == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "Advanced Commands Help!");
SendClientMessage(playerid, COLOR_GREEN, "/kickme - Kicks Player Who Entered Command");
SendClientMessage(playerid, COLOR_GREEN, "/killme - Kills Player Who Entered Command");
SendClientMessage(playerid, COLOR_GREEN, "/banme - Bans Player Who Entered Command");
SendClientMessage(playerid, COLOR_GREEN, "/repair - Repair Player's Vehicle Who Entered Command");
//This command will show the commands in this filterscript to the player who entered this command
return 1;
}
if(strcmp(cmdtext, "/kickme", true) == 0)
{
//This command will kick the player who enters this command
Kick(playerid);
return 1;
}
if(strcmp("/killme", cmdtext, true))
{
//This command will kill the player who enters this command
SetPlayerHealth(playerid, 0.0);
return 1;
}
if(strcmp("/banme", cmdtext, true))
{
//This command will ban the player who enters this command
Ban(playerid);
return 1;
}
if (!strcmp("/repair", cmdtext))
{
//This command will repair the player's vehicle whoever has entered it
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not currently in a vehicle!");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
return 1;
}
return 0;
}