Рекомендованные сообщения



Не найдено.

3 posts in this topic

Здравствуйте, создал Quest убыть оленей все работает только вот оленей не видно, вот код: 
 

Спойлер

}
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) {
	if(hittype > 4) return false;
	if((hittype == BULLET_HIT_TYPE_PLAYER && ! IsPlayerConnected(hitid)) || (hittype == BULLET_HIT_TYPE_VEHICLE && !IsValidVehicle(hitid)) || (hittype == BULLET_HIT_TYPE_OBJECT && !IsValidVehicle(hitid)) || (hittype == BULLET_HIT_TYPE_PLAYER_OBJECT && !IsValidPlayerObject(playerid, hitid))) return false;
	new string[30];
    if(GetPVarInt(playerid, !"quest_djoni"))
    {
        new objectt = GetPVarInt(playerid, !"object_djoni"),
        killed_deer = GetPVarInt(playerid, !"killed_deer");
        if(hittype == BULLET_HIT_TYPE_PLAYER_OBJECT && hitid == objectt)
        {
            DestroyPlayerObject(playerid, objectt);
            SetPVarInt(playerid, !"killed_deer", killed_deer +1);
            format(string, sizeof(string), "Убито Оленей %d/5.",killed_deer + 1);
            SendClientMessage(playerid, 0xF5DEB3FF, string);

            if(killed_deer == 4)
            {
                D(playerid,0, DSM,!"Quest #1",!"{F5DEB3}Молодец! ты убил всех Оленей,\nтеперь вернись к Джони забери свои деньги! ",!"Закрыть",!"");
                return DeletePVar(playerid, !"object_djoni");
            }
            switch(killed_deer + 1)
            {
                case 1:SetPVarInt(playerid, !"object_djoni",CreatePlayerObject(playerid,19315, -599.41, -1496.85, 11.91, 0.00, 0.00, 0.00));
                case 2:SetPVarInt(playerid, !"object_djoni",CreatePlayerObject(playerid,19315, -271.72, -1187.65, 12.60, 0.00, 0.00, 0.00));
                case 3:SetPVarInt(playerid, !"object_djoni",CreatePlayerObject(playerid,19315, -315.88, -1435.65, 14.50, 0.00, 0.00, 0.00));
                case 4:SetPVarInt(playerid, !"object_djoni",CreatePlayerObject(playerid,19315, -380.89, -1736.42, 12.30, 0.00, 0.00, 0.00));
            }
        }
    }
    return 1;

 

 

Share this post


Link to post
Share on other sites

Подниму

Share this post


Link to post
Share on other sites
object_djoni что присвается этому пвару

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0