Command help
#2

pawn Код:
CMD:abwesend(playerid,params[])
{
    if(GetPVarInt(playerid, "IstAbwesend") == 1) SendClientMessage(playerid, FARBE_GRAU, "Du bist bereits abwesend! Gib '/anwesend' ein wenn du zurьck bist.");
    SendClientMessage(playerid, FARBE_GRAU, "Du bist nun abwesend! Gib '/anwesend' ein wenn du wieder da bist.");
    anwesendabwesend[playerid] = Create3DTextLabel("Abwesend",0xFF0000DE,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(anwesendabwesend[playerid], playerid, 0.0, 0.0, 0.7);
    new string3[70];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string3, sizeof(string3), "%s ist nun abwesend.", name);
    SendClientMessageToAll(FARBE_BRAUN, string3);
    SetPVarInt(playerid, "IstAbwesend", 1);
    return 1;
}
CMD:anwesend(playerid,params[])
{
    if(!GetPVarInt(playerid, "IstAbwesend")) return SendClientMessage(playerid, FARBE_GRAU, "Du bist nicht abwesend! Gib '/abwesend' ein wenn du weg willst.");
    SendClientMessage(playerid, FARBE_GRAU, "Du bist nun wieder anwesend!");
    TogglePlayerControllable(playerid,1);
    new string3[70];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string3, sizeof(string3), "%s ist wieder anwesend!", name);
    SendClientMessageToAll(FARBE_BRAUN, string3);
    Delete3DTextLabel(Text3D:anwesendabwesend[playerid]);
    SetPVarInt(playerid, "IstAbwesend", 0);
    return 1;
}
Reply


Messages In This Thread
Command help - by svaba - 14.08.2011, 20:46
Re: Command help - by woot - 14.08.2011, 20:53
Re: Command help - by svaba - 14.08.2011, 20:56
Re: Command help - by Improvement™ - 14.08.2011, 20:58
Re: Command help - by woot - 14.08.2011, 21:02
Re: Command help - by svaba - 14.08.2011, 21:07
Re: Command help - by svaba - 14.08.2011, 21:13

Forum Jump:


Users browsing this thread: 1 Guest(s)