ELEGY HELP 3!
#1

Hey guys. I tired many times to construct that command but it don't work.
When i spawn the elegy everything is ok, i make the command for all players.
But when i exit the vehicle and type /elegy again, it gets spawned again.
I wanna make the command when anyone type /elegy again the other car gets destroyed and let spawn new car.
Here is the command.

pawn Код:
if (strcmp("/elegy", cmdtext, true, 10) == 0)
    {
    new Float: X, Float: Y, Float: Z, Float: A;
    new vehicleid[MAX_PLAYERS];
    if(IsPlayerInAnyVehicle(playerid))  return SendClientMessage(playerid, COLOR_RED, "ERROR: You are driving a vehicle.");
    if(vehicleid[playerid])
    {
        DestroyVehicle(vehicleid[playerid]);
    }
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, A);
    vehicleid[playerid] = CreateVehicle(562, X, Y, Z, A, 0, 0, 0);
    PutPlayerInVehicle(playerid, vehicleid[playerid], 0);
    return 1;
    }
+REP for the dude who help me.
Reply


Messages In This Thread
ELEGY HELP 3! - by necrobg3 - 20.08.2012, 10:23
Re: ELEGY HELP 3! - by AliveBG - 20.08.2012, 10:47
Re: ELEGY HELP 3! - by milanosie - 20.08.2012, 10:48
Re: ELEGY HELP 3! - by necrobg3 - 20.08.2012, 19:58
Re: ELEGY HELP 3! - by necrobg3 - 20.08.2012, 23:25
Re: ELEGY HELP 3! - by AliveBG - 21.08.2012, 00:30
Re: ELEGY HELP 3! - by necrobg3 - 21.08.2012, 09:22

Forum Jump:


Users browsing this thread: 1 Guest(s)