Jump to content
  • 0

masini la factiuni


Andr3y

Question

Deci sunt la Mate info si am invatat o metoda cu vectorii si n`am gandit ca ar merge si in samp dar nush dc nu merge deci ... sus la new am bagat

new pdc[10]
apoi am creat jos de tot
forward IsACopCar(carid)

public IsACopCar(carid)

{

for(new i = 0; i < sizeof(pdc); i++)

{

if(carid == pdc)

{

return 1;

}

}

return 0;

}

apoi am adaugat la masini pdc[0] = AddStatic....

                                          pdc[1] = Addstaic... etc

iar la

if(newcar == pdc || newcar == pdc2 || newcar == pdc3 || newcar == etc)

{

    if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) { }

    else

{

        SCM(playerid,COLOR_WHITE,"You are not a member Pd !");

        RemovePlayerFromVehicle(playerid);

    }

}

am facut asa

if(newcar == pdc)

{

    if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) { }

    else

{

        SCM(playerid,COLOR_WHITE,"You are not a member PD !");

        RemovePlayerFromVehicle(playerid);

    }

}

Din cate stiu eu ar trebui sa mearga dar nu stiu dc nu merge

Snapshot_2012_03_07_003934.jpg
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Normal ca nu merge :)

Cu pdc poti defini decat o singura masina.

Incerca asa [pawn]new pdcar[4];//nr-u masinilor +1

forward IsACopCar(carid)

public IsACopCar(carid)

{

for(new i = 0; i < sizeof(pdcar); i++)

{

if(carid == pdcar)

{

return 1;

}

}

return 0;

}

//OnGameModeInit

pdcar[0] = AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);

pdcar[1] = AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);

pdcar[2] = AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);

pdcar[3] = AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);

IsACopCar(carid)

{

if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) { }

else

{

SCM(playerid,COLOR_WHITE,"You are not a member PD !");

RemovePlayerFromVehicle(playerid);

}

}

[/pawn]

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Link to comment
Share on other sites

Normal ca nu merge :)

Cu pdc poti defini decat o singura masina.

Incerca asa [pawn]new pdcar[4];//nr-u masinilor +1

forward IsACopCar(carid)

public IsACopCar(carid)

{

for(new i = 0; i < sizeof(pdcar); i++)

{

if(carid == pdcar)

{

return 1;

}

}

return 0;

}

//OnGameModeInit

pdcar[0] = AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);

pdcar[1] = AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);

pdcar[2] = AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);

pdcar[3] = AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);

IsACopCar(carid)

{

if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) { }

else

{

SCM(playerid,COLOR_WHITE,"You are not a member PD !");

RemovePlayerFromVehicle(playerid);

}

}

[/pawn]

Trebuia sa scri acolo SendClientMessage in loc de SCM dar e bine si asa

Raven's Roleplay translated percent

button.php?barPosition=20&leftFill=%2300FF33

Link to comment
Share on other sites

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.