11.07.2012, 16:24
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/attach", true, 7) == 0)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, 1) {
RemovePlayerAttachedObject(playerid, 1); }
if(IsPlayerAttachedObjectSlotUsed(playerid, 0) {
RemovePlayerAttachedObject(playerid, 0); }
SetPlayerAttachedObject(playerid, 0, 19270, 5);
SetPlayerAttachedObject(playerid, 1, 19270, 5);
return 1;
}
if(strcmp(cmdtext, "/remove", true, 7) == 0)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, 1) {
RemovePlayerAttachedObject(playerid 1); }
if(IsPlayerAttachedObjectSlotUsed(playerid, 0) {
RemovePlayerAttachedObject(playerid, 0); }
return 1;
}
return 1;
}