SA-MP Forums Archive
[Ayuda] Poner que el coche no se quede punteado al bajar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Ayuda] Poner que el coche no se quede punteado al bajar (/showthread.php?tid=274291)



[Ayuda] Poner que el coche no se quede punteado al bajar - Sergikoh - 05.08.2011

Buenas, tengo en mi gm el sistema ganzuas y puente, el problema es que al puntear un coche , ese coche se queda punteado hasta que el server se reinicia o alguien lo compra, me gustaria poner que si alguien lo puntea, baja y vuelve a subir tenga que volver a puntearlo.

Muchas Gracias

Код:
if (strcmp(cmd, "/Puente", true) == 0)
{
if(PlayerInfo[playerid][pGanzua] == 0)//esto es para definir si no tienen ganzuas
{
SendClientMessage(playerid, COLOR_GREY, " No tienes ganzuas para hacer un puente!");//este es el mensaje que saldra si no las tienen
return 1;
}
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Debes Estar en Un Coche para Usar el Comando");
return 1;
}
if(!engineOn[GetPlayerVehicleID(playerid)])
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
return 1;
}

if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509)
{
return 1;
}
if(idcar == 59 || idcar == 60)
{
return 1;
}
if(idcar >= 135 && idcar <= 154)
{
return 1;
}
if(IsAPlane(idcar))
{
return 1;
}
if(IsAHarvest(idcar))
{
return 1;
}
if(IsADrugHarvest(idcar))
{
return 1;
}
if(IsASweeper(idcar))
{
return 1;
}
if(IsAGarbage(idcar))
{
return 1;
}
if(gEngine[playerid] == 1)
{
return 1;
}

new playerveh = GetPlayerVehicleID(playerid);
PutPlayerInVehicle(playerid, playerveh, 0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s toma una ganzua del bolsillo", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("robovehiculo",3500,0,"i",playerid);
GameTextforPlayer(playerid, "/w/Robando Vehiculo...",3500,3);
PlayerInfo[playerid][pGanzua] -= 1;
gEngine[playerid] = 1;
}
return 1;
}



Respuesta: [Ayuda] Poner que el coche no se quede punteado al bajar - [J]ulian - 05.08.2011

Ponй el callback de "robovehiculo", para decirte que hacer en OnPlayerExitVehicle. Que no se cual es la variable.


Respuesta: [Ayuda] Poner que el coche no se quede punteado al bajar - Fede.Zink - 05.08.2011

Pero escuchame Vos Pusiste que Tenga SIERTA cantidad de Ganzuas ejemplo le pones que tenga 5 ganzuas, Ocea 5 oportunidades de Puntear, entonces un user va y puentea un coche gasta su ultima ganzua todo bien, anda un rato y se baja del coche a no se a un 24/7 si vos pones qe se apage en onplayerExitVehicle no podria ese user que bajo a un 24/7 usarlo nuevamente por que el coche se apagaria y no tiene mas ganzuas :S estaria muy mal eso ;S


Respuesta: [Ayuda] Poner que el coche no se quede punteado al bajar - Sergikoh - 05.08.2011

Vale ya esta echo.

Cierren Tema!