Command /spawnbike problem
#3

Quote:
Originally Posted by ReD_HunTeR
Посмотреть сообщение
it happend with me too, try this

pawn Код:
new vbike[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    vbike[playerid] = 0;
    return 1;
}

CMD:spawnbike(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2, 1670.1096, -1697.3649, 15.1642))
    {
        if(vbike[playerid] != 0)
        {
            vbike[playerid] = AddStaticVehicleEx(509, 1670.1096, -1697.3649, 15.1642, -93.3600, 1, 1, 10, -1);
            PutPlayerInVehicle(playerid, vbike[playerid], 0);
            SendClientMessage(playerid, COLOR_WHITE, "Ai spawnat un bike!");
        }
        else
        {
            DestroyVehicle(vbike[playerid]);
            vbike[playerid] = 0;
            SendClientMessage(playerid, COLOR_WHITE, "Aveai deja un vehicul {00ff00}spawnat{ffffff}.");
            SendClientMessage(playerid, COLOR_WHITE, "Din fericire a fost {00ff00}despawnat{ffffff}.");
            SendClientMessage(playerid, COLOR_WHITE, "Foloseste {00ff00}/spawnbike {ffffff}din nou pentru a spawna alt {00ff00}BIKE{ffffff}.");
        }
    }
    return 1;
}
Thank you. It worked mostly as if to [ if(vbike [playerid] != 0) ] we put = instead of ! and it worked.
Reply


Messages In This Thread
Command /spawnbike problem - by TheNippy - 17.10.2018, 08:10
Re: Command /spawnbike problem - by ReD_HunTeR - 17.10.2018, 08:25
Re: Command /spawnbike problem - by TheNippy - 17.10.2018, 08:44

Forum Jump:


Users browsing this thread: 2 Guest(s)