25.07.2017, 23:57
Hello friends, you see that I am a little lost in this matter, I am making a command so that users of a certain faction, (Taxi drivers) can put "An object / label" to vehicles of the faction that obviously for not being " Taxis "have nothing to identify them as one, so I took the task of adding the following, using the variables in my Game Mode, so that the command is integrated.
The question is the following, I get the object perfectly to the vehicle, but I can not get it to remove it after using the command again.
I need help with this; I leave them with the current code, (It does not give me any compilation errors or warnings)
From already thank you very much.
Needless to say that by using the command again, this one displays the message "Remove the taxi sign from the vehicle" But does not remove the object.
By the way, if you could help me to limit not only the use to (MyNearCar & Faction Car) but also the specific model 560 (Sultan)
The question is the following, I get the object perfectly to the vehicle, but I can not get it to remove it after using the command again.
I need help with this; I leave them with the current code, (It does not give me any compilation errors or warnings)
From already thank you very much.
Код:
// COMANDO: /Estado Uber else if (strcmp("/State Pro", cmdtext, true, 11) == 0 && strlen(cmdtext) == 11 || strcmp("/State Uber", cmdtext, true, 12) == 0 && strlen(cmdtext) == 12 ) { if ( PlayersData[playerid][Faccion] == TAXI ) { new MyNearCar = IsPlayerInNearVehicle(playerid); if ( MyNearCar) { new TaxiID = IsVehicleTaxi(MyNearCar); new TaxiSignOn = CreateObject(19311,0,0,-1000,0,0,0,100); new TaxiSignOff = DestroyObject(TaxiSignOn); //i try it with DestroyObject(19311); And it does not do anything anyway if ( TaxiID != -1 ) { new MsgEstadoTaxi[MAX_TEXT_CHAT]; if ( TaxisTaximetro[TaxiID][TaxiOn]) { TaxisTaximetro[TaxiID][TaxiOn] = false; format(MsgEstadoTaxi, sizeof(MsgEstadoTaxi), "Remove the taxi sign from the vehicle"); DestroyObject(TaxiSignOff); } else { TaxisTaximetro[TaxiID][TaxiOn] = true; format(MsgEstadoTaxi, sizeof(MsgEstadoTaxi), "Place the taxi sign in the vehicle"); AttachObjectToVehicle(TaxiSignOn, MyNearCar, 0.024999,-0.220000,0.919999,0.000000,0.000000,1.080024); } Acciones(playerid, 8, MsgEstadoTaxi); } else { SendInfoMessage(playerid, 0, "975", "This vehicle is not a taxi"); } } } else { SendInfoMessage(playerid, 0, "976", "You are not a taxi driver!!"); } }
By the way, if you could help me to limit not only the use to (MyNearCar & Faction Car) but also the specific model 560 (Sultan)