08.04.2012, 05:44
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
ClearAnimations(playerid,5);
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,COLOR_YELLOW,"You have commited a sucide");
SetPlayerScore(playerid, GetPlayerScore(playerid) - 2);
new msg[128],
suicider[MAX_PLAYER_NAME];
GetPlayerName(playerid, suicider, sizeof suicider);
format(msg, sizeof(msg), "%s has commited suicide!", suicider);
SendClientMessageToAll(COLOR_RED, msg);
return 1;
}
if (strcmp("/sync", cmdtext, true, 10) == 0)
{
ClearAnimations(playerid,5);
SendClientMessage(playerid,COLOR_YELLOW,"If you are still bugged then ask adminis to help you.If there is not admins then please relog and report about the bug in forums.");
return 1;
}
if (strcmp("/bodyguard", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Bodyguard", "Bodyguard's job is to protect a player who called for a bodyguard.You will get money for this from the player who called you", "Ok", "Cancle");
return 1;
}
//Animations
if (strcmp("/handsup", cmdtext, true, 10) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
return 1;
}
if (strcmp("/sit", cmdtext, true, 10) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SITTING);
return 1;
}
if (strcmp("/smoke", cmdtext, true, 10) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
return 1;
}
if (strcmp("/anims", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_YELLOW,"/handsup /sit /call /smoke");
return 1;
}
return 0;
}

