[Pomoc]Oruzja

Započeo [CH] Raza, Jul 01, 2013, 00:13:08 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: CHDM
Detaljan opis problema: Vako, pocetnik sam u ovom i pravim DM srv i sad kad me porta na neku mapu DM, ostanu oruzja koje sam vec imao a dodju nova, npr Sniper DM kad odem u taj DM dobijem sniper al mi se ne oduzmu oruzja koje sam vec prije imao. Pa to me zanima kako kad udjem u neku mapu ili neki DM pa da mi samo oruzja budu koje stavim,da oduzme oruzje koje vec imam. Hvala
Dio skripte://
Poslednja Izmena: Jul 01, 2013, 00:38:11 PRE PODNE od AngeloPr0

ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, Id oruzija , cellmax);
69

Zahvaljujem , pomogli ste mi   :)

Još da te pitam kad si tu, kada umrem da ne izlazim iz DMzone da ostanem u njoj i da napravim komandu za /napustidm ili nesto slicno ? Koristim CMD:

CMD:napustidm(playerid, params[])
{
        if (AdisDM[playerid] == 1)
        {
                ResetPlayerWeapons(playerid);
                SetPlayerArmour(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerInterior(playerid,0);
                SpawnPlayer(playerid);
                AdisDM[playerid] = 0;
                AdisID[playerid] = 0;
        }
        else
    {
        return SendClientMessage(playerid,  0xFF0000AA, "{33FF00}[C++]:{FF0000} Niste na DeathMatchu ");
    }
        return 1;
}

ovo pod OnPlayerSpawn
if(Mrtav[playerid] == 1 && AdisID[playerid] == 1)
    {
        SetPlayerInterior(playerid, 1);
        SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
        SetPlayerVirtualWorld(playerid, 1);
        Mrtav[playerid] = 0;
    }
    SetPlayerInterior(playerid,0);
    return 1;

Dao sam ti primjer ti samo prilgodi svom systemu
Poslednja Izmena: Jul 01, 2013, 00:34:01 PRE PODNE od C++
69

C:\Users\KORISNIK\Desktop\sss\pawno\include\YSI\y_ini.inc(416) : warning 219: local variable "f" shadows a variable at a preceding level
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(5981) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6013) : error 017: undefined symbol "PlayerName"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6016) : error 017: undefined symbol "PlayerName"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6023) : error 017: undefined symbol "PlayerName"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6027) : error 017: undefined symbol "PlayerName"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6033) : error 017: undefined symbol "PlayerName"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6037) : error 017: undefined symbol "OcistiChat"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6043) : error 017: undefined symbol "OnPlayerLogout"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6050) : error 017: undefined symbol "f"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6050) : warning 215: expression has no effect
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6050) : error 001: expected token: ";", but found "]"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6050) : error 029: invalid expression, assumed zero
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6050) : fatal error 107: too many error messages on one line



te mi erore izbaci....

Nemozes bukvalno kopirat moj kod u skriptu moras namjestit po svome kodu
69

Eo sredio sam nesto i sad mi izbaciva samo ove erore!

C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6050) : error 017: undefined symbol "Mrtav"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6050) : warning 215: expression has no effect
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6050) : error 001: expected token: ";", but found "]"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6050) : error 029: invalid expression, assumed zero
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6050) : fatal error 107: too many error messages on one line



Jel mozda u cemu je problem ?


C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6052) : error 017: undefined symbol "AdisID"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6052) : warning 215: expression has no effect
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6052) : error 001: expected token: ";", but found "]"
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6052) : error 029: invalid expression, assumed zero
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6052) : fatal error 107: too many error messages on one line


Napisao sam i rijesio sam se tog "Mrtav" al ovo nikako da se rijesi -,-

new AdisID[MAX_PLAYERS];
new AdisDM[MAX_PLAYERS];
na vrh
69

Ma to sam brate odma stavio cim si mi reko za ono "Mrtav"

Al opet izbaiva par erora :/

C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6053) : error 036: empty statement
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6054) : warning 217: loose indentation
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6060) : warning 217: loose indentation
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6062) : warning 225: unreachable code
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(8421) : error 036: empty statement
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(10319) : warning 203: symbol is never used: "Gate"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

Citat: AngeloPr0 poslato Jul 01, 2013, 01:03:36 PRE PODNE
Ma to sam brate odma stavio cim si mi reko za ono "Mrtav"

Al opet izbaiva par erora :/

C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6053) : error 036: empty statement
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6054) : warning 217: loose indentation
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6060) : warning 217: loose indentation
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(6062) : warning 225: unreachable code
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(8421) : error 036: empty statement
C:\Users\KORISNIK\Desktop\sss\gamemodes\CHDM.pwn(10319) : warning 203: symbol is never used: "Gate"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

Daj linije
69


public OnPlayerSpawn(playerid)
{
    if(Mrtav[playerid] == 1 || AdisID[playerid] == 1);
{
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid, 1107.6791,-1796.6454,16.5938);
    SetPlayerVirtualWorld(playerid, 1);
    Mrtav[playerid] = 0;
}
    SetPlayerInterior(playerid, 0);
    return 1;
new string[128], Sati, Min, Sec, Godina, Mjesec, Dan;
getdate(Godina, Mjesec, Dan);
gettime(Sati, Min, Sec);
if(PlayerInfo[playerid][pSH] < 1.0)
{
PlayerInfo[playerid][pSH] = 50.0;
}
StopAudioStreamForPlayer(playerid);
SetPlayerScore(playerid, PlayerInfo[playerid][Level]);
SetPlayerPosEx(playerid, -2706.289306,376.629730,4.968364);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
SetPlayerHealth(playerid, PlayerInfo[playerid][pSH]);
TextDrawShowForPlayer(playerid, KizlaRandomP);
SetPlayerColor(playerid, COLOR_WHITE);
OcistiChat(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerFacingAngle(playerid, 180.772293);
if(PlayerInfo[playerid][Clan] == 1 || PlayerInfo[playerid][Lider] == 1)//db
{
SetPlayerPosEx(playerid, 1368.8961,-1663.0394,13.3828);
SetPlayerFacingAngle(playerid, 92.622077);
SetPlayerColor(playerid, COLOR_GREEN);
GivePlayerWeapon(playerid, 24, 150);
GivePlayerWeapon(playerid, 32, 350);
GivePlayerWeapon(playerid, 26, 250);
}
if(PlayerInfo[playerid][Clan] == 2 || PlayerInfo[playerid][Lider] == 2)//pr
{
SetPlayerPosEx(playerid, 1644.2480,-1835.8229,13.5477);
SetPlayerFacingAngle(playerid, 256.013916);
SetPlayerColor(playerid, COLOR_YELLOW);
GivePlayerWeapon(playerid, 24, 150);
GivePlayerWeapon(playerid, 32, 350);
GivePlayerWeapon(playerid, 26, 250);
}
if(PlayerInfo[playerid][Clan] == 3 || PlayerInfo[playerid][Lider] == 3)//faf
{
SetPlayerPosEx(playerid, 1516.9237,-1498.5789,13.5643);
SetPlayerFacingAngle(playerid, 184.074111);
SetPlayerColor(playerid, COLOR_RED);
GivePlayerWeapon(playerid, 24, 150);
GivePlayerWeapon(playerid, 32, 350);
GivePlayerWeapon(playerid, 26, 250);
}
if(PlayerInfo[playerid][Clan] == 4 || PlayerInfo[playerid][Lider] == 4)//sr
{
SetPlayerPosEx(playerid, 955.3480,-1546.8390,13.5954);
SetPlayerFacingAngle(playerid, 91.185379);
SetPlayerColor(playerid, COLOR_BLUE);
GivePlayerWeapon(playerid, 24, 150);
GivePlayerWeapon(playerid, 32, 350);
GivePlayerWeapon(playerid, 26, 250);
}
if(GetPVarInt(playerid, "Prijavljen") == 1)
    {
        GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
        SetPVarInt(playerid, "Prijavljen", 0);
        format(string, sizeof(string), "*Dobrodosao %s na nas server, ljepo te opet vidjeti!", PlayerName(playerid));
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        format(string, sizeof(string), "*Tvoji statsi: Level [%d] | Respekti [%d/%d] | Minuta online: [%d]",PlayerInfo[playerid][Level], PlayerInfo[playerid][exp],PlayerInfo[playerid][Level] * 4,PlayerInfo[playerid][Minute]);
        SendClientMessage(playerid, COLOR_WHITE, string);
        format(string, sizeof(string), "*Sada je: %d:%dh | Datum: %d.%d.%d", Sati, Min, Dan, Mjesec, Godina);
        SendClientMessage(playerid, COLOR_YELLOW, string);
if(PlayerInfo[playerid][NBB] > 0)
{
format(string, sizeof(string), "*Donator: Vi jos imate %d NBB", PlayerInfo[playerid][NBB]);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
if(PlayerInfo[playerid][pAdmin] > 0)
{
format(string, sizeof(string), ".:| Dobrodosao %s, ulogirao si se kao Admin Level %d |:.", PlayerName(playerid), PlayerInfo[playerid][pAdmin]);
        SendClientMessage(playerid, COLOR_OLIVE, string);
        format(string, sizeof(string), ".:| FR Admin %s, level: %d, je usao na server |:.", PlayerName(playerid), PlayerInfo[playerid][pAdmin]);
        SendAdminMessage(1, COLOR_CHARTREUSE, string);
}
    }
    if(PlayerInfo[playerid][war1] == 1)
    {
SetPlayerPosEx(playerid,x_warCR,y_warCR,z_warCR);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 25, 300);
GivePlayerWeapon(playerid, 26, 300);
GivePlayerWeapon(playerid, 29, 300);
GivePlayerWeapon(playerid, 31, 300);
GivePlayerWeapon(playerid, 32, 300);
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 7);
}
if(PlayerInfo[playerid][war2] == 1)
{
        SetPlayerPosEx(playerid,x_warPL,y_warPL,z_warPL);
        ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 25, 300);
GivePlayerWeapon(playerid, 26, 300);
GivePlayerWeapon(playerid, 29, 300);
GivePlayerWeapon(playerid, 31, 300);
GivePlayerWeapon(playerid, 32, 300);
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 7);
}
return 1;
}

ne sve vec  na kojima baca errore ???
69

if(Mrtav[playerid] == 1 || AdisID[playerid] == 1);
{
SetPlayerInterior(playerid, 0);
new string[128], Sati, Min, Sec, Godina, Mjesec, Dan;
if(AdisDM[playerid] == 1);