Einmal möchte ich eine Zeit Begrenzung auf 20 Sekunden in diesen Command: kann mir das jemand machen und fertig drunter posten
if(strcmp("/usedrugs", cmd, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pDrugs] >= 2)
{
new Float:Health;
GetPlayerName(playerid,sendername,sizeof(sendername));
GetPlayerHealth(playerid, Health);
PlayerStoned[playerid] += 1;
if(PlayerStoned[playerid] >= 3)
{
PlayerStonedTime[playerid] = 180;
}
if(PlayerStonedTime[playerid] > 0)
{
GameTextForPlayer(playerid, "~w~Du bist~n~~p~bekifft", 4000, 1);
SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid) +3000);
}
if(PlayerInfo[playerid][pDrugPerk] > 0)
{
new hp = 5 * PlayerInfo[playerid][pDrugPerk];
SetPlayerHealth(playerid, Health + hp);
}
else
{
SetPlayerHealth(playerid, Health + 4);
}
PlayerInfo[playerid][pDrugs] -= 2;
OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
format(string, sizeof(string), "* %s pfeift sich 2 Gramm getrocknetes Gras rein.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
format(string,sizeof(string),"* %s nutzt usedrugs", sendername);
EnterToLog("usedrugs",string);
}
else
{
SendClientMessage(playerid, COLOR_ERRORTEXT, " Du hast keine Drogen !");
}
}
return 1;
}
und noch /admins bei diesem Befehl sehen normale User nicht wer On ist nur die admins und da steht egal welcher Rang Admin:(ID)(Name)(Rang) und ich hätte gerne das es jeder sieht und das es so dort steht Rangname:[Name][ID] auch dann bitte fertig drunter posten
if(strcmp("/admins", cmd, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Admins Online:");
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
if(PlayerInfo[i][pAdmin] >= 1 && AFKModus[i] == 0){
if(PlayerInfo[i][pAdmin] != 0 && PlayerInfo[i][pAdmin] < 1338){
new AdminRangName[25];
if(PlayerInfo[i][pAdmin] == -1){AdminRangName = "Beschwerdemoderator";}
if(PlayerInfo[i][pAdmin] == 1){AdminRangName = "Supporter";}
if(PlayerInfo[i][pAdmin] == 2){AdminRangName = "OberSupporter";}
if(PlayerInfo[i][pAdmin] == 3){AdminRangName = "Moderator";}
if(PlayerInfo[i][pAdmin] == 4){AdminRangName = "SupperModerator";}
if(PlayerInfo[i][pAdmin] == 5){AdminRangName = "Admin";}
if(PlayerInfo[i][pAdmin] == 6){AdminRangName = "SupperAdmin";}
if(PlayerInfo[i][pAdmin] == 1337){AdminRangName = "Fulladmin";}
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "%s: %s", AdminRangName, sendername);
SendClientMessage(playerid, COLOR_GREY, string);
}}}}}
else if(PlayerInfo[playerid][pAdmin] != 0){
SendClientMessage(playerid, COLOR_GREY, "Admins Online:");
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
if(PlayerInfo[i][pAdmin] != 0 && PlayerInfo[i][pAdmin] != 2050){
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin: [%d]%s (%d)", i, sendername, PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_GREY, string);
}}}}}
return 1;
}
Es wäre sehr hilfreich wenn mir jemand helfen würde!
Lg. Luis