Jump to content
  • 0

Probleme la neon


Fallen0329

Question

Incerc acuma sa fac un sistem de neon si problema este in felul urmator daca in gamemode am creat in felul urmator

dcmd_vneon(playerid, params[])
{
    if(PlayerInfo[playerid][pVIP]<2)return SendClientMessage(playerid, red, "[ERROR]You must became Silver member to use this command");
    new neon;
    if(sscanf(params,"i",neon))
    {
         SendClientMessage(playerid,red,"[ERROR]USAGE: /neon [colorID]");
         SendClientMessage(playerid,red,"[ERROR]USAGE: Color: 0-Red, 1-Blue, 2-Green, 3-Yellow, 4-Pink, 5-White");
         return 1;
    }
    if(neon < 0 || neon > 5)
    {
        SendClientMessage(playerid,red,"[ERROR]USAGE: /neon [colorID]");
        SendClientMessage(playerid,red,"[ERROR]USAGE: Color: 0-Red, 1-Blue, 2-Green, 3-Yellow, 4-Pink, 5-White");
        return 1;
    }
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, red, "[ERROR]You are not in a vehicle!");
    new vehid = GetPlayerVehicleID(playerid);
    DestroyDynamicObject(CarNeon1[vehid]);
    DestroyDynamicObject(CarNeon2[vehid]);
    CarNeon1[vehid] = CreateDynamicObject(18647+neon, 0, 0, 0, 0, 0, 0);
    CarNeon2[vehid] = CreateDynamicObject(18647+neon, 0, 0, 0, 0, 0, 0);
    new mod = GetVehicleModel(vehid);
    if(mod == 509 || mod == 481 || mod == 510 || mod == 462 || mod == 448 || mod == 581 || mod == 522 || mod == 461 || mod == 521 || mod == 523 || mod == 463 || mod == 586 || mod == 568 || mod == 471)
    {
       AttachDynamicObjectToVehicle(CarNeon1[vehid], vehid, 0.00, 0.00, -0.34, 0, 0, 0);
       SendClientMessage(playerid,green,"Added Neon on this car");
       return 1;
    }
    else if(mod == 548 || mod == 425 || mod == 417 || mod == 487 || mod == 488 || mod == 497 || mod == 563 || mod == 447 || mod == 469)
    {
        AttachDynamicObjectToVehicle(CarNeon1[vehid], vehid, 1.14, 0.38, -1.04, 0, 0, 0);
        AttachDynamicObjectToVehicle(CarNeon2[vehid], vehid, -1.14, 0.38, -1.04, 0, 0, 0);
        SendClientMessage(playerid,green,"Added Neon on this car");
        return 1;
    }
    else
    {
       AttachDynamicObjectToVehicle(CarNeon1[vehid], vehid, 0.98, 0.00, -0.46, 0, 0, 0);
       AttachDynamicObjectToVehicle(CarNeon2[vehid], vehid, -0.98, 0.00, -0.46, 0, 0, 0);
       SendClientMessage(playerid,green,"Added Neon on this car");
    }
     return 1;
}

Totul merge perfect, dar eu vreau ca sa ma bazez pe functiile normale de creare si atasare a obiectelor, nu vreau prin streamer. Si in momentul in care daca schimb functiile (adica sterg acel Dynamic) atunci comanda nu mai merge, nu creeaza si nici nu ataseaza obiectul de masina.

La compilare nu apare eroare nici cand folosesc streamer nici cand e normal

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • 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.