16.08.2012, 20:16
Hello forum samp.
Im trying to make a personal veh command.
When i type /elegy - to spawn an elegy , when i type /elegy second time the first car get destroyed not with DestroyVehicle but with the command. I mean if i exit the car let the first car get destroyed automaticly by the command.
I tried to make it many times in much diferrent ways ,but nothing happened.
So i am stuck here.
Any ideas? +Rep for the dude who will help me.
Im trying to make a personal veh command.
When i type /elegy - to spawn an elegy , when i type /elegy second time the first car get destroyed not with DestroyVehicle but with the command. I mean if i exit the car let the first car get destroyed automaticly by the command.
I tried to make it many times in much diferrent ways ,but nothing happened.
So i am stuck here.
Код:
if (strcmp("/elegy", cmdtext, true, 10) == 0) { if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You already have a car."); new Float:X, Float:Y, Float:Z, elegy; GetPlayerPos(playerid, X, Y, Z); elegy = CreateVehicle(562, X, Y, Z, 0.0, 0, 0, 0); PutPlayerInVehicle(playerid, elegy, 0); return 1; }