- 0
Problema /sspecoff
-
Similar Content
-
- 0 answers
- 51 views
-
- 6 replies
- 336 views
-
- 4 replies
- 288 views
-
- 1 answer
- 599 views
-
- 3 replies
- 229 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
TheGodfather
Salut, cand dau /sspecoff la inhouse in loc sa imi puna valoarea 107 imi pune valoarea -1 chiar daca la ultimul mesaj de la /sspecoff la in house imi spune 107. Aveti idee de ce?
YCMD:sspec(playerid, params[], help) {
if(aspam[playerid] > 0) return SCMf(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d %s.", aspam[playerid], aspam[playerid] > 1 ? "seconds" : "second");
if(PlayerInfo[playerid][pAdmin] < return SCM(playerid, COLOR_WHITE, AdminOnly);
virtualw = GetPlayerVirtualWorld(playerid);
new id,string[180];
if(sscanf(params, "u", id)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/spec <playerid/name>");
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "That player is not connected.");
if(id == playerid) return SCM(playerid, COLOR_GREY, "You can not use this command on you!");
if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_GREY, "You can not use this command on that player.");
if(IsPlayerLogged[id] == 0) return SCM(playerid, COLOR_LGREEN, "Error: That player is logging!");
Spectate[playerid] = id;
SpecPlayers[playerid] ++;
if(SpecPlayers[playerid] == 1) {
GetPlayerPos(playerid, SpecPos[playerid][0], SpecPos[playerid][1], SpecPos[playerid][2]);
IsPlayerSpec[playerid] = 1;
pInteriorID[playerid] = GetPlayerInterior(playerid);
pVirtual[playerid] = GetPlayerVirtualWorld(playerid);
//inaintespec
GetPlayerPos(playerid, InainteDeSpec[playerid][0], InainteDeSpec[playerid][1], InainteDeSpec[playerid][2]);
inaintehouse[playerid] = InHouse[playerid];
inaintehq[playerid] = InHQ[playerid];
inaintebusiness[playerid] = InBussines[playerid];
//inaintespec
}
new Float:health;
GetPlayerHealthEx(Spectate[playerid], health);
new rank[50];
if(PlayerInfo[playerid][pAdmin] != 0) rank = "Admin";
else rank = "Helper";
if(GetPVarInt(id, "Reported") == 1 && GetPVarInt(id, "ReportType") != 4 && PlayerInfo[playerid][pAdmin] >= 1) {
SetPVarInt(id, "Reported", 0);
SetPVarInt(id, "ReportType", 0);
SetPVarString(id, "ReportedBy", "");
SetPVarInt(id, "ReportScore", 0);
SetPVarString(id, "ReportText", "");
}
if(PlayerInfo[playerid][pAdmin] >= 1 && GetPVarInt(id, "ReportType") != 4) {
PlayerInfo[playerid][pHelpedPlayers] += GetPVarInt(id, "ReportScore");
PlayerInfo[playerid][pHelpedPlayersToday] += GetPVarInt(id, "ReportScore");
}
new szQuery[256];
mysql_format(SQL, szQuery, sizeof(szQuery), "UPDATE users SET `HelpedPlayers` = '%d', `HelpedPlayersToday`='%d' WHERE `ID` = '%d'", PlayerInfo[playerid][pHelpedPlayers], PlayerInfo[playerid][pHelpedPlayersToday], PlayerInfo[playerid][pSQLID]);
mysql_tquery(SQL, szQuery, "", "");
format(string, sizeof(string), "[SPEC] (%d) %s | Level: %d | Health: %.2f | AFK Time: %d | Seconds: %.0f | Duty: %d | Ping: %d",id,GetName(id),PlayerInfo[id][pLevel], health, AFKSeconds[id], PlayerInfo[id][pSeconds], OnDuty[id], GetPlayerPing(id));
SCM(playerid, 0xFFADADFF, string);
new Player_Weapons[13], Player_Ammos[13], i, guns;
string = "Weapons:";
for(i = 1;i <= 12;i++) {
GetPlayerWeaponData(id,i,Player_Weapons[i],Player_Ammos[i]);
if(Player_Weapons[i] != 0) {
new weaponName[180];
GetWeaponName(Player_Weapons[i],weaponName,255);
format(string,255, "%s %s (%d)", string, weaponName,Player_Ammos[i]);
guns ++;
}
}
if(guns > 0) SCM(playerid, -1, string);
Iter_Add(MySpec[id], playerid);
TogglePlayerSpectating(playerid, 1);
SetPlayerInterior(playerid, GetPlayerInterior(id));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
if(IsPlayerInAnyVehicle(Spectate[playerid])) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(Spectate[playerid]));
else PlayerSpectatePlayer(playerid, Spectate[playerid]);
PlayerTextDrawSetString(playerid, SpectatorTD, "Loading...");
PlayerTextDrawShow(playerid, SpectatorTD);
return true;
}
YCMD:sspecoff(playerid, params[], help) {
if(aspam[playerid] > 0) return SCMf(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d %s.", aspam[playerid], aspam[playerid] > 1 ? "seconds" : "second");
if(PlayerInfo[playerid][pAdmin] < return SCM(playerid, COLOR_WHITE, AdminOnly);
if(Spectate[playerid] == 255) return SCM(playerid, COLOR_GREY, "You are not spectating a player.");
TogglePlayerControllable(playerid, 1);
TogglePlayerSpectating(playerid, 0);
PlayerInfo[playerid][pInt] = pInteriorID[playerid];
PlayerInfo[playerid][pLocal] = pVirtual[playerid];
SetPlayerInterior(playerid, pInteriorID[playerid]);
Unspec[playerid][sLocal] = 255;
gTeam[playerid] = PlayerInfo[playerid][pTeam];
SetPlayerToTeamColor(playerid);
SCM(playerid, -1, "You are no longer spectating!");
Iter_Remove(MySpec[Spectate[playerid]], playerid);
Spectate[playerid] = 255;
SpecPlayers[playerid] = 0;
LastRecon[playerid] = 1;
PlayerTextDrawHide(playerid, SpectatorTD);
Iter_Clear(MySpec[playerid]);
//inaintespec
SetPlayerPos(playerid, InainteDeSpec[playerid][0], InainteDeSpec[playerid][1], InainteDeSpec[playerid][2]);
InHouse[playerid] = inaintehouse[playerid];
InHQ[playerid] = inaintehq[playerid];
InBussines[playerid] = inaintebusiness[playerid];
SCMf(playerid, -1, "house: %d l hq: %d l Biz: %d", InHouse[playerid], InHQ[playerid], InBussines[playerid]);
//inaintespec
return true;
}
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.