[pomoc]/spec

Započeo Poslednji Don, Oktobar 16, 2011, 01:01:47 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:GF edit...(stari Balkan Mafia GameMod)
Detaljan opis problema:Pa kada admin spec-a igraca i zavrsi kuca /specoff i bude mu kao da je umro i mora pricekati 30 sekundi(sto je standardno na BM gamemodu kad neko umre) stvara se ispred bolnice i to je to.
Dio skripte:    if(strcmp(cmd,"/spec",true) == 0)
{
    if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_DARKNICERED, "Nemozete koristiti ovu komandu jer nisi Administrator.");
return 1;
}
    tmp = strtok(cmdtext,idx);
    if(strlen(tmp) == 0)
{
        SendClientMessage(playerid, COLOR_GRAD1, "/spec [igracev ID/Dio imena] (ili /specoff)");
return 1;
}
    new otherplayer = ReturnUser(tmp);
    if(otherplayer == INVALID_PLAYER_ID)
    {
SendClientMessage(playerid, COLOR_GREY, "Netocan ID!");
return 1;
}
    TogglePlayerSpectating(playerid,1);
    if(IsPlayerInAnyVehicle(otherplayer)==1)
{
    new Float:health;
    new Float:armour;
new name[MAX_PLAYER_NAME];
GetPlayerName(otherplayer, name, sizeof(name));
GetPlayerHealth(otherplayer, health);
GetPlayerArmour(otherplayer, armour);
format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~y~%s(ID:%d)~n~~y~Snaga:%.1f~n~Armor:%.1f",name,otherplayer,health,armour);
GameTextForPlayer(playerid, string, 2500, 3);
PlayerSpectateVehicle(playerid, GetPlayerVehicleID(otherplayer));
}
    else
{
    new Float:health;
    new Float:armour;
new name[MAX_PLAYER_NAME];
GetPlayerName(otherplayer, name, sizeof(name));
GetPlayerHealth(otherplayer, health);
GetPlayerArmour(otherplayer, armour);
format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~y~%s(ID:%d)~n~~y~Snaga:%.1f~n~Armor:%.1f",name,otherplayer,health,armour);
GameTextForPlayer(playerid, string, 2500, 3);
PlayerSpectatePlayer(playerid,otherplayer);
}
    SendClientMessage(playerid, COLOR_WHITE, "Da prestanete pratiti nekog, upisite /specoff.");
    return 1;
}
if(strcmp(cmd,"/specoff",true)==0)
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    TogglePlayerSpectating(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerInterior(playerid,0);
    MedicBill[playerid] = 0;
    SpawnPlayer(playerid);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid, COLOR_YELLOW, "Prestali ste pratiti igraca.");
    return 1;
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):

Poslednja Izmena: Oktobar 16, 2011, 01:03:55 PRE PODNE od [BM]Poslednji Don



Kad bih ponovo mogao da biram...al' nemozes da biras.
Zajebes jedan minus i ode ceo zadatak u kurac. Ceo fazon brate, nema druge sanse.

izbrisi ovo MedicBill[playerid] = 0; i dodaj SetPlayerPos da se stvori na mjesto gdje ti hoces...
Respect to:
[BD]Gagi

ne radi...tacnije isto kao i prije  :(



Kad bih ponovo mogao da biram...al' nemozes da biras.
Zajebes jedan minus i ode ceo zadatak u kurac. Ceo fazon brate, nema druge sanse.

Citat: [BM]Poslednji Don poslato Oktobar 16, 2011, 22:09:25 POSLE PODNE
ne radi...tacnije isto kao i prije  :(
Gle ti kad odes specoff tebe killa.. a posto si rekao da kad umres da moras cekati 30 sec onda nemos nista ili obrisati da cekas 20 sec ili pravit novu spec komandu...

ja sam probao...msm napravio novu komandu i sve al opet me kill  :(



Kad bih ponovo mogao da biram...al' nemozes da biras.
Zajebes jedan minus i ode ceo zadatak u kurac. Ceo fazon brate, nema druge sanse.

Hoce ovako:

if(strcmp(cmd,"/specoff",true)==0)
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    TogglePlayerSpectating(playerid,0);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerInterior(playerid,0);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid, COLOR_YELLOW, "Prestali ste pratiti igraca.");
    return 1;
}
return 1;
}