Salut ! Am luat gamemode de la edison, acela facut de la 0 care nu are cam nimic inauntru, dar intampin o problema, daca am admin si imi dau respawn, imi dispare admin-ul, si nu pot sa inteleg de ce, daca dau /sethp 0 idem, dispare admin-ul, nu pot sa inteleg de ce, am cautat in gamemode dar nu gasesc nimic, la compilat nu are nici o eroare sau avertizare ! Ma puteti ajuta? Va las aici comanda de la /respawn si /sethp
CMD:respawn(playerid, params[])
{
new userID, string[256];
if(PlayerInfo[playerid][pAdmin] == 0) return NotAdmin(playerid);
if(sscanf(params, "u", userID)) return SCM(playerid, COLOR_SERVER, "Syntax: {FFFFFF}/respawn <playerid>");
if(!IsPlayerConnected(userID)) return NotConnected(playerid);
if(userID == playerid && (1 <= PlayerInfo[playerid][pAdmin] <= 4)) return NotAcces(playerid);
if(PlayerInfo[userID][pAdmin] >= 1 && (1 <= PlayerInfo[playerid][pAdmin] <= 4)) return NotAdministrator(playerid);
if(userID != INVALID_PLAYER_ID)
{
SpawnPlayer(userID);
foreach(Player,i) {
if(PlayerInfo[i][pLanguage] == 1 && PlayerInfo[i][pAdmin] >= 5 && Logs[i] == 1) {
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
format(string, sizeof(string), "<Staff>: %s l-a respawnat pe %s[ID: %d].", GetName(playerid), GetName(userID), userID);
SCM(i, COLOR_LOGS, string);
}
}
if(PlayerInfo[playerid][pLanguage] == 1) format(string, sizeof(string), "L-ai respawnat pe %s[ID: %d].", GetName(userID), userID);
SCM(playerid, COLOR_WHITE, string);
if(PlayerInfo[userID][pLanguage] == 1) format(string, sizeof(string), "Admin %s te-a respawnat.", GetName(playerid));
SCM(userID, COLOR_WHITE, string);
}
return 1;
}
si aici /sethp
CMD:sethp(playerid, params[])
{
new userID, hp, string[256];
if(PlayerInfo[playerid][pAdmin] == 0) return NotAdmin(playerid);
if(sscanf(params, "ui", userID, hp)) return SCM(playerid, COLOR_SERVER, "Syntax: {FFFFFF}/sethp <playerid> <hp>");
if(!IsPlayerConnected(userID)) return NotConnected(playerid);
if(userID == playerid && (1 <= PlayerInfo[playerid][pAdmin] <= 4)) return NotAcces(playerid);
if(PlayerInfo[userID][pAdmin] >= 1 && (1 <= PlayerInfo[playerid][pAdmin] <= 4)) return NotAdministrator(playerid);
if(userID != INVALID_PLAYER_ID)
{
SetPlayerHealth(userID, hp);
foreach(Player,i) {
if(PlayerInfo[i][pLanguage] == 1 && PlayerInfo[i][pAdmin] >= 5 && Logs[i] == 1) {
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
format(string, sizeof(string), "<Staff>: %s i-a setat viata la %d hp lui %s[ID: %d].", GetName(playerid), hp, GetName(userID), userID);
SCM(i, COLOR_LOGS, string);
}
else if(PlayerInfo[i][pLanguage] == 2 && PlayerInfo[i][pAdmin] >= 5 && Logs[i] == 1) {
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
format(string, sizeof(string), "<Staff>: %s has set %d hp of %s[ID: %d].", GetName(playerid), hp, GetName(userID), userID);
SCM(i, COLOR_LOGS, string);
}
}
if(PlayerInfo[playerid][pLanguage] == 1) format(string, sizeof(string), "I-ai setat lui %s[ID: %d] viata la %d hp.", GetName(userID), userID, hp);
else if(PlayerInfo[playerid][pLanguage] == 2) format(string, sizeof(string), "You set the %d hp of %s[ID: %d].", hp, GetName(userID), userID);
SCM(playerid, COLOR_WHITE, string);
}
return 1;
}
Tin sa precizez ca sunt la inceput cu script si pawno ! Sper sa ma puteti ajuta !! Multumesc mult !