Jump to content

Question

Posted (edited)
  1. Ce ai încercat să faci:Sa definesc functia dar nu merge
  2. Erori/atentionari:
  3. error 017: undefined symbol "function"C:\Users\Vali\Desktop\New folder (2)\gamemodes\HGL.pwn(7835) : error 012: invalid function call, not a valid address
    C:\Users\Vali\Desktop\New folder (2)\gamemodes\HGL.pwn(7835) : warning 215: expression has no effect
    C:\Users\Vali\Desktop\New folder (2)\gamemodes\HGL.pwn(7835) : error 001: expected token: ";", but found ")"
    C:\Users\Vali\Desktop\New folder (2)\gamemodes\HGL.pwn(7835) : fatal error 107: too many error messages on one line


     
  4. Cod sursă:function miner1(playerid){
    ClearAnimations(playerid);
    return 1;
    }
    function miner(playerid)
    {
    new RandomMaterial = random(4);
    switch(RandomMaterial)
    {
    case 0:
    {
    ClearAnimations(playerid);
    marfap[playerid] = 1;
    SendClientMessage(playerid, 0xFFFFFFFF, "Transporta aurul la depozit!");
    SendClientMessage(playerid, 0xFFFFFFFF, "Dute afara si urcate intr-o masian pentru a livra incarcatura");
    ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
    SetPlayerAttachedObject(playerid,0,2060,14,0.247998,-0.191998,0.132000,100.499984,10.199997,-102.599983,0.518998,0.708000,1.068999, 0xFFFFFF00);
    materialmine[playerid] = 1;//Aur
    }
    case 1:
    {
    ClearAnimations(playerid);
    marfap[playerid] = 1;
    SendClientMessage(playerid, 0xFFFFFFFF, "Transporta uraniul la depozit!");
    SendClientMessage(playerid, 0xFFFFFFFF, "Dute afara si urcate intr-o masian pentru a livra incarcatura");
    ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
    SetPlayerAttachedObject(playerid,0,2060,14,0.247998,-0.191998,0.132000,100.499984,10.199997,-102.599983,0.518998,0.708000,1.068999, 0xFF09FF00);
    materialmine[playerid] = 2;//Uraniu
    }
    case 2:
    {
    ClearAnimations(playerid);
    marfap[playerid] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Transporta argint-ul la depozit!");
    SendClientMessage(playerid, 0xFFFFFFFF, "Dute afara si urcate intr-o masian pentru a livra incarcatura");
    ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
    SetPlayerAttachedObject(playerid,0,2060,14,0.247998,-0.191998,0.132000,100.499984,10.199997,-102.599983,0.518998,0.708000,1.068999, 0xFFB7B9B7);
    materialmine[playerid] = 3;//Argint
    }
    case 3:
    {
    ClearAnimations(playerid);
    marfap[playerid] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Transporta cuprul la depozit!");
    SendClientMessage(playerid, 0xFFFFFFFF, "Dute afara si urcate intr-o masian pentru a livra incarcatura");
    ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
    SetPlayerAttachedObject(playerid,0,2060,14,0.247998,-0.191998,0.132000,100.499984,10.199997,-102.599983,0.518998,0.708000,1.068999, 0xFFAB4444);
    materialmine[playerid] = 4;//Cupru
    }
    }
    return 1;
    }
    if(IsPlayerInRangeOfPoint(playerid, 5.0, -388.3176,2228.2351,42.4297))
    {
    if(marfap[playerid] == 1)
    {
    if(materialmine[playerid] == 1)
    {
    marfap[playerid] = 0; GivePlayerMoney(playerid, 3500);
    SetTimerEx("miner1",100, false, "i", playerid);
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 3500$ pentru 6kg {F1F50A}aur");
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "MINER:Intoarcete in mina pentur a aduce {F1F50A}alta incarcatura");
    SetPlayerCheckpoint(playerid,-446.7098,1444.1129,21.2195,8.0);
    ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
    }
    else if(materialmine[playerid] == 2)
    {
    marfap[playerid] = 0; GivePlayerMoney(playerid, 3350);
    SetTimerEx("miner1",100, false, "i", playerid);
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 3350$ pentru 7kg {98F10A}uraniu");
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "MINER:Intoarcete in mina pentur a aduce {98F10A}alta incarcatura");
    SetPlayerCheckpoint(playerid,-446.7098,1444.1129,21.2195,8.0);
    ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
    }
    else if(materialmine[playerid] == 3)
    {
    marfap[playerid] = 0; GivePlayerMoney(playerid, 3400);
    SetTimerEx("miner1",100, false, "i", playerid);
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 3400$ pentru 8kg {F2F6EB}argint");
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "MINER:Intoarcete in mina pentur a aduce {F2F6EB}alta incarcatura");
    SetPlayerCheckpoint(playerid,-446.7098,1444.1129,21.2195,8.0);
    ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
    }
    else if(materialmine[playerid] == 4)
    {
    marfap[playerid] = 0; GivePlayerMoney(playerid, 3350);
    SetTimerEx("miner1",100, false, "i", playerid);
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 3350$ pentru 10kg {5B4A2F}cupru");
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "MINER:Intoarcete in mina pentur a aduce {5B4A2F}alta incarcatura");
    SetPlayerCheckpoint(playerid,-446.7098,1444.1129,21.2195,8.0);
    ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, "MINER:: Dute si fa rost de marfa!");
    }
    }
    }

     
  5. Imagini:-
  6. Precizări:cand definesc functia imi da pawno.exe has stopped
Edited by ValyYellow

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.