• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ayuda CP
#1
Tengo una duda c?mo puedo enganchar un remolque y que se marqu? un CreateDynamicCP tengo esta?funci?n

public OnPlayerAttachTrailer(playerid, vehicleid, trailerid)
{
if(IsTrailerAttachedToVehicle(vehicleid) && SPAWN_REMOLQUE_GASOLINA != 1)
{
Random_Gasolina(playerid);
}
? ? return 1;
}

stock Random_Gasolina(playerid)
{
new Gascolina = random(3);
switch(Gascolina)
{
case 0:
{
if(IsValidDynamicCP(PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT]))
{
DestroyDynamicCP(PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT]);
PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT] = INVALID_STREAMER_ID;
}
PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT] = CreateDynamicCP(363.3305, 869.4847, 20.3811, 5.0, 0, 0, playerid, 9999999999.0);
SendClientMessage(playerid, -1, "Lleva el remolque hacia donde se marc?");

new info[1];
info[0] = CHECKPOINT_TYPE_ENTER_GASOLINE;
Streamer_SetArrayData(STREAMER_TYPE_CP, PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT], E_STREAMER_EXTRA_ID, info);
}
case 1:
{
if(IsValidDynamicCP(PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT]))
{
DestroyDynamicCP(PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT]);
PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT] = INVALID_STREAMER_ID;
}
PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT] = CreateDynamicCP(-137.1521, -72.7862, 3.0911, 5.0, 0, 0, playerid, 9999999999.0);
SendClientMessage(playerid, -1, "Lleva el remolque hacia donde se marc?");

new info[1];
info[0] = CHECKPOINT_TYPE_ENTER_GASOLINE;
Streamer_SetArrayData(STREAMER_TYPE_CP, PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT], E_STREAMER_EXTRA_ID, info);
}
case 2:
{
if(IsValidDynamicCP(PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT]))
{
DestroyDynamicCP(PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT]);
PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT] = INVALID_STREAMER_ID;
}
PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT] = CreateDynamicCP(2822.7476, 955.9294, 10.7289, 5.0, 0, 0, playerid, 9999999999.0);
SendClientMessage(playerid, -1, "Lleva el remolque hacia donde se marc?");

new info[1];
info[0] = CHECKPOINT_TYPE_ENTER_GASOLINE;
Streamer_SetArrayData(STREAMER_TYPE_CP, PLAYER_TEMP[playerid][pt_TRAILERO_CHECKPOINT], E_STREAMER_EXTRA_ID, info);
}
}
return 1;
}
  Reply


Messages In This Thread
ayuda CP - by Nikolay_Staggs - 2021-01-28, 08:33 PM
RE: ayuda CP - by Leonardo - 2021-01-29, 01:34 PM
RE: ayuda CP - by Nikolay_Staggs - 2021-01-29, 07:30 PM
RE: ayuda CP - by Leonardo - 2021-01-30, 09:06 AM
RE: ayuda CP - by Nikolay_Staggs - 2021-01-30, 03:03 PM

Forum Jump: